Messenger of Allah ﷺ said, "Whoever could get one rakʿa (of the Fajr prayer) before sunrise, he has got the (morning) prayer and whoever could get one rakʿa of the ʿAsr prayer before sunset, he has got the (ʿAsr) prayer." (Using translation from Bukhārī 579)
أَنَّ رَسُولَ اللهِ ﷺ قَالَ «مَنْ أَدْرَكَ رَكْعَةً مِنَ الصُّبْحِ قَبْلَ أَنْ تَطْلُعَ الشَّمْسُ فَقَدْ أَدْرَكَ وَمَنْ أَدْرَكَ رَكْعَةً مِنَ الْعَصْرِ قَبْلَ أَنْ تَغْرُبَ الشَّمْسُ فَقَدْ أَدْرَكَ»