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.