Abdullah bin Abbas reported,

A man asked the Prophet ﷺ, "My father has reached the age of Hajj, but he is an elderly man who cannot remain steady on his mount. If I tie him to it, I fear he will die. May I perform Hajj on his behalf?"The Prophet ﷺ replied, "Tell me, if your father owed a debt and you paid it off for him, would that be acceptable?"The man said, "Yes."The Prophet ﷺ said, "Then perform Hajj on behalf of your father."

Azami 4770

Sahih

عن عبد الله بن عباس

أن رجلا سأل النبي ﷺ أن أبي أدركه الحج وهو شيخ كبير لا يثبت على راحلته فإن شددته خشيت أن يموت أفأحج عنه؟ قال: أرأيت لو كان عليه دين فقضيته أكان مجزنا؟ قال: نعم. قال: فحج عن أبيك.

الأعظمي 4770صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Hajj
Chapter
Obligation of Hajj, its virtue, and its conditions
Section
Hajj on behalf of the incapacitated due to old age, chronic illness, and the like
Numbering
Jami al-Kamil 4770 (2nd edition)
Azami 4770