كتاب الحج
15  
The Book of Pilgrimage
(71)
Chapter: Hajj on behalf of one who is incapable of doing it because of chronic illness, old age and the like, or on behalf of one who has died
(71)
باب الْحَجِّ عَنِ الْعَاجِزِ، لِزَمَانَةٍ وَهِرَمٍ وَنَحْوِهِمَا أَوْ لِلْمَوْتِ ‏‏
Sahih Muslim 1334

'Abdullah b. 'Abbas reported that while al-Fadl b. Abbas had been riding behind Allah's Messenger (ﷺ) a women of the tribe of Khath'am came to him (to the Holy Proppet) asking for a religious verdict. Fadl looked at her and she looked at him. Allah's Messenger (ﷺ) turned the face of al-Fadl to the other side. She said:

Messenger of Allah, there is an obligation from Allah upon His servants in regard to Hajj. (But) my father is an aged man; he is incapable of riding safely. May I perform Hajj on his behalf? He said: Yes. It was during the Farewell Pilgrimage.
حَدَّثَنَا يَحْيَى بْنُ يَحْيَى، قَالَ قَرَأْتُ عَلَى مَالِكٍ عَنِ ابْنِ شِهَابٍ، عَنْ سُلَيْمَانَ بْنِ، يَسَارٍ عَنْ عَبْدِ اللَّهِ بْنِ عَبَّاسٍ، أَنَّهُ قَالَ كَانَ الْفَضْلُ بْنُ عَبَّاسٍ رَدِيفَ رَسُولِ اللَّهِ صلى الله عليه وسلم فَجَاءَتْهُ امْرَأَةٌ مِنْ خَثْعَمَ تَسْتَفْتِيهِ فَجَعَلَ الْفَضْلُ يَنْظُرُ إِلَيْهَا وَتَنْظُرُ إِلَيْهِ فَجَعَلَ رَسُولُ اللَّهِ صلى الله عليه وسلم يَصْرِفُ وَجْهَ الْفَضْلِ إِلَى الشِّقِّ الآخَرِ ‏.‏ قَالَتْ يَا رَسُولَ اللَّهِ إِنَّ فَرِيضَةَ اللَّهِ عَلَى عِبَادِهِ فِي الْحَجِّ أَدْرَكَتْ أَبِي شَيْخًا كَبِيرًا لاَ يَسْتَطِيعُ أَنْ يَثْبُتَ عَلَى الرَّاحِلَةِ أَفَأَحُجُّ عَنْهُ قَالَ ‏ "‏ نَعَمْ ‏"‏ ‏.‏ وَذَلِكَ فِي حَجَّةِ الْوَدَاعِ ‏.‏
Reference : Sahih Muslim 1334
In-book reference : Book 15, Hadith 455
USC-MSA web (English) reference : Book 7, Hadith 3089
  (deprecated numbering scheme)