Is it better to do Hajj on behalf of the deceased or to use that money to set up ongoing charity on his behalf?
Question

There is a seventy-year-old man who did Hajj, and he wants to do Hajj on behalf of his mother who died without having done Hajj, as she could not afford to do Hajj. And he wants to do Hajj on behalf of his wife who died and was not able to afford to do Hajj from her own money, but her husband was able to pay the costs of Hajj for her. My question is: in view of his health and advanced age, is it better for him to do Hajj on behalf of his mother and then on behalf of his wife, or to use that money to set up ongoing charity (sadaqah jaariyah) and intend it to be on their behalf?
Praise be to Allah.One of the ways in which a person may honour his parents and show kindness to his wife is to strive to do that which will raise them in status and increase their good deeds after they die.
If the questioner has the choice between doing Hajj on their behalf or giving money in charity on their behalf, we suggest that he should begin with Hajj. So he should start by doing Hajj on behalf of his mother, then doing Hajj on behalf of his wife, doing that himself or paying the costs of Hajj for someone who will do it on their behalf, if he is not able to do Hajj. That is because of the immense reward for Hajj, and because it may have been obligatory for them, if they were able to do it at any time during their lifetime, even if that was when they were young. So doing Hajj on their behalf himself will discharge their duty, and if he is able to pay the costs for two people to do Hajj on their behalf in the same year, that would be a good idea.
Shaykh Ibn ‘Uthaymeen (may Allah have mercy on him) was asked: Which is better, to do Hajj on behalf of one who has passed away, or to give that money in charity to those who are in need?
He replied: If the deceased did not do the obligatory Hajj, then undoubtedly appointing someone to do Hajj on his behalf is better, because it is fulfilling an obligatory duty. But if it is a supererogatory Hajj, then he should work out what will serve the greater interest. If people are in severe need and there is a famine, then giving charity is better, otherwise doing Hajj on behalf of that deceased person is better." Majmoo‘ al-Fataawa  21/263).
Then if he has money available after that, and Allah has made him well off and he wants to give charity on behalf of both of them, then he may set up ongoing charity (sadaqah jaariyah), even if it is small, and he can include himself, his parents and his wife in that, such as contributing to the building of a mosque, or the digging of a well, or the setting up of a waqf (endowment) to help the needy, and the like.
Note:
With regard to what is mentioned in the question, “but her husband was able to pay the costs of Hajj for her,” we would like to point out that it is not obligatory for the husband to cover the costs of Hajj for his wife, even if he is rich. Rather that is recommended and he will be rewarded for it, and it comes under the heading of showing kindness to her. But if he does not do that, there is no sin on him.
For more information, please see the answer to question no. 8916 .