A man came to the prayer out of breath and said, "Allah is the Greatest. All praise belongs to Allah, abundant, wholesome, and blessed praise."When the Messenger of Allah ﷺ finished his prayer, he asked, "Which of you spoke those words? He said nothing wrong."The man replied, "It was I, Messenger of Allah. I came short of breath and said them."The Prophet ﷺ said, "I saw twelve angels rushing to be the one to carry those words up."Humayd added in his version, "When one of you comes to the prayer, let him walk at his usual pace. Let him pray whatever he catches with the imam, and make up whatever he missed."
حدثنا موسى بن إسمعيل أخبرنا حماد عن قتادة وثابت وحميد
أن رجلا جاء إلى الصلاة وقد حفزه النفس فقال الله أكبر الحمد لله حمدا كثيرا طيبا مباركا فيه فلما قضى رسول الله ﷺ صلاته قال أيكم المتكلم بالكلمات فإنه لم يقل بأسا فقال الرجل أنا يا رسول الله جئت وقد حفزني النفس فقلتها فقال لقد رأيت اثني عشر ملكا يبتدرونها أيهم يرفعها وزاد حميد فيه وإذا جاء أحدكم فليمش نحو ما كان يمشي فليصل ما أدركه وليقض ما سبقه
Muslim narrated it in the chapter on Mosques, section "What is said between the opening takbir of ihram and the recitation," hadith no. 600, from the hadith of Hammad bin Salama through this same chain.