Hadith 4762
٤٧٦٢ - حدثنا أبو بكر قال (حدثنا) (١) يحيى بن سعيد عن سعيد عن قتادة (عن أنس) (٢) أنه فاتته ركعة فقام فتطوع ثم ذكر فصلى الركعة التي فاتته وسجد سجدتين (٣).
Hazrat Qatadah says that Hazrat Anas missed one rak‘ah with the imam, so he stood up and performed nafl prayers. Then he remembered that rak‘ah, so he performed it and did two prostrations.
Hadith 4763
٤٧٦٣ - حدثنا يحيى بن سعيد عن شعبة عن الحكم قال: يقطع ويصلي الركعة قال: وأظنه قال: ويسجد سجدتين.
Hazrat Hakam says that if a person misses a rak‘ah with the imam and, forgetting it, becomes engaged in nafl prayers, then when he remembers, he should break the nafl prayers and perform that rak‘ah. The narrator says that I think he also said that he should perform two sajdahs.
Hadith 4764
٤٧٦٤ - حدثنا هشيم عن يونس عن الحسن أنه كان يقول في رجل فاتته مع ⦗٥٣٤⦘ الإمام ركعة فلما سلم الإمام ظن أنه قد أدرك معه أول الصلاة فقام يتطوع فقال الحسن: إذا (أدخل) (١) تطوعا في فريضة فسدت عليه صلاته.
Hasan was asked about the person who misses one rak‘ah with the imam, and when the imam says salam, he thinks that he had joined the imam from the beginning, so he says salam and starts offering nafl prayers. Hasan said: When he included the nafl prayer in the obligatory prayer, his prayer was invalidated.