The Prophet ﷺ said, "Whoever catches one rak'ah of the dawn prayer before the sun rises has caught the prayer, and whoever catches two rak'ahs of the afternoon prayer before the sun sets has caught the prayer."
حدثنا محمد بن جعفر وأبو النضر قالا حدثنا شعبة عن سهيل بن أبي صالح عن أبيه
عن النبي ﷺ أنه قال من أدرك ركعة من صلاة الصبح قبل طلوع الشمس فقد أدرك الصلاة ومن أدرك ركعتين من العصر قبل أن تغيب الشمس فقد أدرك الصلاة
Its isnad is sahih. Bukhari related it, 1/151, in "Timings," "Whoever catches a rakat..." Muslim related it similarly, 1/424, no. 608, in "Mosques." Tirmidhi related it similarly, 1/353, no. 186, in "Prayer." Nasai related it similarly to Bukhari, 1/273, no. 550. And Ibn Majah, 1/229, no. 699.