"The Imam is appointed to be followed. When he bows, then bow, when he stands up, then stand up, when he prostrates, then prostrate, and when he says Sami' Alldhu liman hamidah (Allah hears the one who praises Him), then say, Rabbanri lakal-hamd (Our Lord, to You be the praise)." (Using translation from Nasāʾī 794)
أَنَّ النَّبِيَّ ﷺ سَقَطَ مِنْ فَرَسٍ عَلَى شِقِّهِ الْأَيْمَنِ فَدَخَلُوا عَلَيْهِ يَعُودُونَهُ فَحَضَرَتِ الصَّلَاةُ فَلَمَّا قَضَى الصَّلَاةَ قَالَ إِنَّمَا الْإِمَامُ لِيُؤْتَمَّ بِهِ فَإِذَا رَكَعَ فَارْكَعُوا وَإِذَا رَفَعَ فَارْفَعُوا وَإِذَا قَالَ سَمِعَ اللهُ لِمَنْ حَمِدَهُ فَقُولُوا رَبَّنَا وَلَكَ الْحَمْدُ