Only one intention is regarded when a legally responsible person performs Hajj. Accordingly, if one intends to perform Hajj for oneself, one gets the reward for oneself, and if one intends to perform it on behalf of one’s parent, it is the parent who gets the reward of Hajj. But one will also get a reward for expressing gratitude to one’s parents by doing so.
Accordingly, a person is not to perform Hajj for oneself and on behalf of a parent at the same time. Hajj is an act of worship that is not to be offered with multiple intentions.
Regarding this, the late Muslim scholar Sheikh `Abdul `Aziz ibn Baz, former Mufti of Saudi Arabia (may Allah have mercy upon him) issued the following:
Hajj is to be performed once in a lifetime. So, if someone intends to perform Hajj for himself, he is to get the reward of it himself; and if he intends to offer it for a parent, it is the parent that will get the reward of Hajj, but he will get a reward also for being grateful to his parents by doing so.
The same goes for `Umrah. This is to say, if someone intends to perform `Umrah for his parent who died or who is physically unable to do it him/herself, it is the parent that will get the reward of `Umrah, but he will be rewarded for being dutiful to his parents. However, if he makes one intention for all (i.e., himself, father, and mother), only he will get the reward for Hajj; i.e., Hajj is counted for him only.