Yazid bin Amir reported,

I came while the Prophet ﷺ was in prayer, so I sat down and did not join them in the prayer. The Messenger of Allah ﷺ then turned to us and saw Yazid sitting, and he asked, "Have you not become a Muslim, Yazid?"Yazid replied, "Yes, Messenger of Allah, I have become a Muslim."He asked, "Then what prevented you from joining the people in their prayer?"Yazid said, "I had already prayed in my home, thinking that you had all prayed."He said, "When you come to the prayer and find the people praying, pray with them. If you have already prayed, it will count as a voluntary prayer for you, and this one will be the obligatory prayer."

Abu Dawud 577

Daif

حدثنا قتيبة حدثنا معن بن عيسى عن سعيد بن السائب عن نوح بن صعصعة

عن يزيد بن عامر قال

جئت والنبي ﷺ في الصلاة فجلست ولم أدخل معهم في الصلاة قال فانصرف علينا رسول الله ﷺ فرأى يزيد جالسا فقال ألم تسلم يا يزيد قال بلى يا رسول الله قد أسلمت قال فما منعك أن تدخل مع الناس في صلاتهم قال إني كنت قد صليت في منزلي وأنا أحسب أن قد صليتم فقال إذا جئت إلى الصلاة فوجدت الناس فصل معهم وإن كنت قد صليت تكن لك نافلة وهذه مكتوبة

أبو داود 577ضعيف
Contents
Reference
Commentary
Ayat
Collection
Sunan Abu Dawud
Book
Prayer
Chapter
One who prays at home then catches the congregation and prays with them
Numbering
Darussalam 577
Abu Dawud 577