Sahih Muslim – Hadith No : 1684

‘Abdullah b. Sarjis reported: A person entered the mosque, while the Messenger of Allah (may peace be upon him) was leading the dawn prayer. He observed two rak’ahs in a corner of the mosque, and then joined the Messenger of Allah (may peace be upon him) in prayer. When the Messenger of Allah (may peace be upon him) had pronounced salutations (he had concluded the prayer), he said: O, so and so, which one out of these two prayers did you count (as your Fard prayer), the one that you observed alone or the prayer that you observed with us?

Hadith In Arabic Text :

حدثنا أبو كامل الجحدري، حدثنا حماد يعني ابن زيد، ح وحدثني حامد بن عمر البكراوي، حدثنا عبد الواحد يعني ابن زياد، ح وحدثنا ابن نمير، حدثنا أبو معاوية، كلهم عن عاصم، ح وحدثني زهير بن حرب، – واللفظ له – حدثنا مروان بن معاوية الفزاري، عن عاصم الأحول، عن عبد الله بن سرجس، قال دخل رجل المسجد ورسول الله صلى الله عليه وسلم في صلاة الغداة فصلى ركعتين في جانب المسجد ثم دخل مع رسول الله صلى الله عليه وسلم فلما سلم رسول الله صلى الله عليه وسلم قال ‏”‏ يا فلان بأى الصلاتين اعتددت أبصلاتك وحدك أم بصلاتك معنا ‏”‏ ‏.‏

Chapter : The Book of Prayer (Travellers) – كتاب صلاة المسافرين وقصرها