The Messenger of Allah ﷺ ordered Abu Bakr to lead the people in prayer during his illness, so Abu Bakr was leading them. Then the Messenger of Allah ﷺ felt some relief and came out, only to find Abu Bakr leading the people in prayer. When Abu Bakr saw him, he began to step back, but the Messenger of Allah ﷺ gestured to him to stay as he was. The Messenger of Allah ﷺ then sat down beside Abu Bakr, level with him. Abu Bakr was following the prayer of the Messenger of Allah ﷺ, and the people were following the prayer of Abu Bakr.
حدثنا أبو بكر بن أبي شيبة حدثنا عبد الله بن نمير عن هشام بن عروة عن أبيه
أمر رسول الله ﷺ أبا بكر أن يصلي بالناس في مرضه فكان يصلي بهم فوجد رسول الله ﷺ خفة فخرج وإذا أبو بكر يؤم الناس فلما رآه أبو بكر استأخر فأشار إليه رسول الله ﷺ أي كما أنت فجلس رسول الله ﷺ حذاء أبي بكر إلى جنبه فكان أبو بكر يصلي بصلاة رسول الله ﷺ والناس يصلون بصلاة أبي بكر
Bukhari narrated it in the Book of Adhan, Chapter: One who stands beside the imam due to an ailment, Hadith: 683, and Muslim in the Book of Prayer, see the previous hadith, Hadith: 418, from the hadith of Hisham, similarly.