كتاب الصلاة
4
The Book of Prayers
(21)
Chapter: If The Imam Experiences An Excuse, From Illness, Or Travelling, Etc. He May Appoint Someone Else To Lead The People In Prayer; The One Who Offers Prayer Behind The Imam Sitting Because He Is Unable To Stand Must Stand If He Is Able To Do So; And The Abrogation Of Sitting Behind A Sitting Imam For Those Who Are Able To Stand
(21)
باب اسْتِخْلاَفِ الإِمَامِ إِذَا عَرَضَ لَهُ عُذْرٌ مِنْ مَرَضٍ وَسَفَرٍ وَغَيْرِهِمَا مَنْ يُصَلِّي بِالنَّاسِ وَأَنَّ مَنْ صَلَّى خَلْفَ إِمَامٍ جَالِسٍ لِعَجْزِهِ عَنِ الْقِيَامِ لَزِمَهُ الْقِيَامُ إِذَا قَدَرَ عَلَيْهِ وَنَسْخِ الْقُعُودِ خَلْفَ الْقَاعِدِ فِي حَقِّ مَنْ قَدَرَ عَلَى الْقِيَامِ

A'mash reported:

When the Messenger of Allah (ﷺ) suffered from illness of which he died, and in the hadith transmitted by Ibn Mus-hir, the words are: The Messenger of Allah (ﷺ) was brought till he was seated by his (Abu Bakr's) side and the Apostle (ﷺ) led the people in prayer and Abu Bakr was making takbir audible to them, and in the hadith transmitted by 'Isa the (words are):" The Messenger of Allah (ﷺ) sat and led the people in prayer and Abu Bakr was by his side and he was making (takbir) audible to the people."
حَدَّثَنَا مِنْجَابُ بْنُ الْحَارِثِ التَّمِيمِيُّ، أَخْبَرَنَا ابْنُ مُسْهِرٍ، ح وَحَدَّثَنَا إِسْحَاقُ بْنُ إِبْرَاهِيمَ، أَخْبَرَنَا عِيسَى بْنُ يُونُسَ، كِلاَهُمَا عَنِ الأَعْمَشِ، بِهَذَا الإِسْنَادِ نَحْوَهُ وَفِي حَدِيثِهِمَا لَمَّا مَرِضَ رَسُولُ اللَّهِ صلى الله عليه وسلم مَرَضَهُ الَّذِي تُوُفِّيَ فِيهِ ‏.‏ وَفِي حَدِيثِ ابْنِ مُسْهِرٍ فَأُتِيَ بِرَسُولِ اللَّهِ صلى الله عليه وسلم حَتَّى أُجْلِسَ إِلَى جَنْبِهِ وَكَانَ النَّبِيُّ صلى الله عليه وسلم يُصَلِّي بِالنَّاسِ وَأَبُو بَكْرٍ يُسْمِعُهُمُ التَّكْبِيرَ ‏.‏ وَفِي حَدِيثِ عِيسَى فَجَلَسَ رَسُولُ اللَّهِ صلى الله عليه وسلم يُصَلِّي وَأَبُو بَكْرٍ إِلَى جَنْبِهِ وَأَبُو بَكْرٍ يُسْمِعُ النَّاسَ ‏.‏
Reference : Sahih Muslim 418 g
In-book reference : Book 4, Hadith 104
USC-MSA web (English) reference : Book 4, Hadith 838
  (deprecated numbering scheme)