Abdullah bin Sarjas reported,

He said, 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 ﷺ said the closing salam, he said, "So-and-so, which of the two prayers did you count, your prayer alone or your prayer with us?"

Azami 2440

Sahih

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

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

الأعظمي 2440صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Prayer
Chapter
Sunnah prayers and voluntary prayers in general
Section
Dislike of being preoccupied with the two rakah of Fajr when the prayer has been called
Numbering
Jami al-Kamil 2440 (2nd edition)
Azami 2440