The Messenger of Allah ﷺ addressed us, taught us our practice, and explained to us our prayer. He said, "When you stand for prayer, straighten your rows, then let one of you lead you. When he says the takbir, say the takbir. When he says, 'nor of those who go astray,' say 'Ameen,' and Allah will respond to you. Then when he says the takbir and bows, say the takbir and bow, for the imam bows before you and rises before you."The Prophet of Allah ﷺ said, "So that makes up for that. When he says, 'Allah hears whoever praises Him,' say, 'O Allah, our Lord, to You belongs all praise,' for Allah said upon the tongue of His Prophet ﷺ, 'Allah hears whoever praises Him.' Then when he says the takbir and prostrates, say the takbir and prostrate, for the imam prostrates before you and rises before you."The Prophet of Allah ﷺ said, "So that makes up for that. When it is time for the sitting, let the words of one of you be, 'All greetings, good things, and prayers belong to Allah. Peace be upon you, Prophet, and the mercy of Allah and His blessings. Peace be upon us and upon the righteous servants of Allah. I bear witness that there is no god but Allah, and I bear witness that Muhammad is His servant and messenger.'"
أخبرنا محمد بن بشار قال حدثنا يحيى بن سعيد عن هشام عن قتادة ح وأنبأنا محمد بن المثنى قال حدثنا يحيى قال حدثنا هشام قال حدثنا قتادة عن يونس بن جبير
إن رسول الله ﷺ خطبنا فعلمنا سنتنا وبين لنا صلاتنا فقال إذا قمتم إلى الصلاة فأقيموا صفوفكم ثم ليؤمكم أحدكم فإذا كبر فكبروا وإذا قال ولا الضالين فقولوا آمين يجبكم الله ثم إذا كبر وركع فكبروا واركعوا فإن الإمام يركع قبلكم ويرفع قبلكم قال نبي الله ﷺ فتلك بتلك وإذا قال سمع الله لمن حمده فقولوا اللهم ربنا لك الحمد فإن الله عز وجل قال على لسان نبيه ﷺ سمع الله لمن حمده ثم إذا كبر وسجد فكبروا واسجدوا فإن الإمام يسجد قبلكم ويرفع قبلكم قال نبي الله ﷺ فتلك بتلك وإذا كان عند القعدة فليكن من قول أحدكم أن يقول التحيات الطيبات الصلوات لله السلام عليك أيها النبي ورحمة الله وبركاته السلام علينا وعلى عباد الله الصالحين أشهد أن لا إله إلا الله وأشهد أن محمدا عبده ورسوله
[Sahih] Previously mentioned, no. 831. Muslim also narrated it, no. 63/404, from the hadith of Saeed bin Abu Aruba, with this wording. It is also in Kubra, no. 1203.