Sunan Abi Dawud, Book 4, Hadith 1260 (USC-MSA)

Narrated 'Abd Allah b. Sarjas: A man came while the Prophet was leading the people in the dawn prayer. He prayed the two rak'ahs and then joined the congregational prayer led by the Prophet. When he finished the prayer, the Prophet said: So-and-so, which was your real prayer, the one you prayed alone or the one offered with us ?

حَدَّثَنَا سُلَيْمَانُ بْنُ حَرْبٍ، حَدَّثَنَا حَمَّادُ بْنُ زَيْدٍ، عَنْ عَاصِمٍ، عَنْ عَبْدِ اللَّهِ بْنِ سَرْجِسَ، قَالَ جَاءَ رَجُلٌ وَالنَّبِيُّ صلى الله عليه وسلم يُصَلِّي الصُّبْحَ فَصَلَّى الرَّكْعَتَيْنِ ثُمَّ دَخَلَ مَعَ النَّبِيِّ صلى الله عليه وسلم فِي الصَّلاَةِ فَلَمَّا انْصَرَفَ قَالَ ‏ "‏ يَا فُلاَنُ أَيَّتُهُمَا صَلاَتُكَ الَّتِي صَلَّيْتَ وَحْدَكَ أَوِ الَّتِي صَلَّيْتَ مَعَنَا ‏" ‏ ‏.‏

sunnah.com