It was narrated from Abu Hurairah that the Messenger of Allah (ﷺ) said:
"Whoever catches up with a Rak'ah of the Subh prayer before the sun rises, then he has caught up with Subh, and whoever catches up with a Rak'ah of 'Asr prayer before the sun sets, then he has caught up with 'Asr."
English reference: Vol. 1, Book 6, Hadith 518
Arabic reference: Book 6, Hadith 522
Read hadith from the major collections in the app, with prayer times and a Qibla compass. Free.