It is permissible for the one who is appointed to perform Hajj on behalf of someone else to take the money that is given to him in return for doing that Hajj.

The Standing Committee for Islamic Research and Ifta’ said:

It is permissible for the one who is appointed to do Hajj on behalf of someone else to take the money that is given to him in return for doing that Hajj, even if it is more than what he spends on transportation, food and drink, and other things that he needs in order to perform Hajj. It is recommended that he intend to earn reward from Allah for that and do whatever acts of worship that Allah enables him to do in Al-Haram Ash-Sharif (on his own behalf), and not just do it for the money.

Allah Almighty knows best.