Sunan Ibn Majah
1152
Sahih+3

It was narrated from ‘Abdullah bin Sarjis that the Messenger of Allah (ﷺ) saw a man performing the two Rak’ah before the morning prayer while he himself was performing prayer. When he had finished praying he said to him:“Which of your two prayers did you intend to be counted (i.e., accepted)?”

SahihAl-Albani
SahihMuhammad Fouad Abd al-Baqi