Praise be to Allah.
It is permissible for a person to do Hajj at the expense of someone else, whether it is an obligatory or naafil Hajj. It is also permissible to work and do business and earn money during the Hajj. In his Tafseer, al-Tabari narrated with his isnaad from Ibn ‘Abbaas (may Allaah be pleased with him) his comment on the verse in which Allaah says (interpretation of the meaning): “There is no sin on you if you seek the Bounty of your Lord (during pilgrimage by trading)” [al-Baqarah 2:198]. He said: There is no sin on you if you buy and sell before entering ihraam and afterwards.
The scholars of the Standing Committee were asked: what is the ruling on one who does Hajj at the expense of the ruler? i.e., if a ruler wants to give his subjects some money and tells them: Go for Hajj with this money. Is it permissible for them to do Hajj with it or not? If they do Hajj with it, will that count as the obligatory Hajj?
They replied: It is permissible for them to do that, and their Hajj is valid, because of the general meaning of the evidence. End quote.
Fataawa al-Lajnah al-Daa’imah (11/36).
See also the answer to question no. 36841.
And Allaah knows best.