It is narrated from Sayyiduna Fadl (may Allah be pleased with both of them) that a woman from the tribe of Khath'am said, "O Messenger of Allah, my father is an old man and Hajj has been made obligatory upon him by Allah, but he does not have the strength to sit on a camel." So the Noble Prophet (peace and blessings be upon him) said: "Perform Hajj on his behalf."
And the evidence that Allah, Mighty and Majestic, entrusted His Prophet with clarifying what was revealed to him from the revelation, specifically and generally, is that the Prophet, peace and blessings be upon him, clarified that Allah did not intend by His saying: [وَأَنْلَيْسَلِلْإِنْسَانِإِلَّامَاسَعَى][النَّجْمِ] all deeds, and that Allah only intended some striving, not all of it. For if Allah had intended all striving, Hajj would only be for the one who performed it himself, and the obligation of Hajj would not be lifted from a person if it was performed on his behalf, and the one for whom Hajj was performed would not have the striving of another written for him, since he did not himself perform the striving of the deed.
Hadith Referenceصحيح ابن خزيمه / جماع أبواب ذكر أفعال اختلف الناس فى إباحته للمحرم، نصت سنة النبى صلى الله عليه وسلم أو دلت على إباحتها / 3030