Abdullah bin Sarjas reported,

A man entered the mosque while the Messenger of Allah ﷺ was performing the morning prayer. He prayed two rak'ahs on the side of the mosque, then joined the Messenger of Allah ﷺ in prayer.When the Messenger of Allah ﷺ concluded the prayer with the salam, he said, "So-and-so, which of the two prayers do you count as yours, the one you prayed alone or the one you prayed with us?"

Muslim 1651

Sahih

حدثنا أبو كامل الجحدري حدثنا حماد يعني ابن زيد ح و حدثني حامد بن عمر البكراوي حدثنا عبد الواحد يعني ابن زياد ح و حدثنا ابن نمير حدثنا أبو معاوية كلهم عن عاصم ح و حدثني زهير بن حرب واللفظ له حدثنا مروان بن معاوية الفزاري عن عاصم الأحول

عن عبد الله بن سرجس قال

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

مسلم 1651صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Muslim
Book
Travelers' prayer and its shortening
Chapter
Dislike of starting a voluntary prayer after the muezzin begins
Numbering
Darussalam 1651
Muslim 1651