Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
muslim:712[Chain 1] Abū Kāmil al-Jaḥdarī > Ḥammād / Ibn Zayd [Chain 2] Ḥāmid b. ʿUmar al-Bakrāwī > ʿAbd al-Wāḥid / Ibn Ziyād [Chain 3] Ibn Numayr > Abū Muʿāwiyah > ʿĀṣim [Chain 4] Zuhayr b. Ḥarb > Marwān b. Muʿāwiyah al-Fazārī > ʿĀṣim al-Aḥwal > ʿAbdullāh b. Sarjis

A person entered the mosque, while the Messenger of Allah ﷺ was leading the dawn prayer. He observed two rak'ahs in a corner of the mosque, and then joined the Messenger of Allah ﷺ in prayer. When the Messenger of Allah ﷺ 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?  

مسلم:٧١٢حَدَّثَنَا أَبُو كَامِلٍ الْجَحْدَرِيُّ حَدَّثَنَا حَمَّادٌ يَعْنِي ابْنَ زَيْدٍ ح وَحَدَّثَنِي حَامِدُ بْنُ عُمَرَ الْبَكْرَاوِيُّ حَدَّثَنَا عَبْدُ الْوَاحِدِ يَعْنِي ابْنَ زِيَادٍ ح وَحَدَّثَنَا ابْنُ نُمَيْرٍ حَدَّثَنَا أَبُو مُعَاوِيَةَ كُلُّهُمْ عَنْ عَاصِمٍ ح وَحَدَّثَنِي زُهَيْرُ بْنُ حَرْبٍ وَاللَّفْظُ لَهُ حَدَّثَنَا مَرْوَانُ بْنُ مُعَاوِيَةَ الْفَزَارِيُّ عَنْ عَاصِمٍ الأَحْوَلِ عَنْ عَبْدِ اللَّهِ بْنِ سَرْجِسَ قَالَ

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