"If any one of you catches the first prostration of 'Asr prayer before the sun sets, let him complete his prayer, and if he catches up with the first prostration of Fajr prayer before the sub rises, let him complete his prayer."
عَنِ النَّبِيِّ ﷺ قَالَ إِذَا أَدْرَكَ أَحَدُكُمْ أَوَّلَ سَجْدَةٍ مِنْ صَلاَةِ الْعَصْرِ قَبْلَ أَنْ تَغْرُبَ الشَّمْسُ فَلْيُتِمَّ صَلاَتَهُ وَإِذَا أَدْرَكَ أَوَّلَ سَجْدَةٍ مِنْ صَلاَةِ الصُّبْحِ قَبْلَ أَنْ تَطْلُعَ الشَّمْسُ فَلْيُتِمَّ صَلاَتَهُ