كتاب الْمَسَاجِدِ وَمَوَاضِعِ الصَّلاَةِ
5  
The Book of Mosques and Places of Prayer
(30)
Chapter: The one who catches up with a rak`ah of the prayer, he has caught up with that prayer
(30)
باب مَنْ أَدْرَكَ رَكْعَةً مِنَ الصَّلاَةِ فَقَدْ أَدْرَكَ تِلْكَ الصَّلاَةَ ‏
Sahih Muslim 608 c

Abu Huraira reported:

The Messenger of Allah (ﷺ) said: He who finds (gets) a rak'ah of the afternoon (prayer) before the setting of the sun, he in fact gets (the full prayer), and he who gets a rak'ah of the morning (prayer) before the rising of the sun he in fact gets (the full prayer).
وَحَدَّثَنَا حَسَنُ بْنُ الرَّبِيعِ، حَدَّثَنَا عَبْدُ اللَّهِ بْنُ الْمُبَارَكِ، عَنْ مَعْمَرٍ، عَنِ ابْنِ طَاوُسٍ، عَنْ أَبِيهِ، عَنِ ابْنِ عَبَّاسٍ، عَنْ أَبِي هُرَيْرَةَ، قَالَ قَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم ‏ "‏ مَنْ أَدْرَكَ مِنَ الْعَصْرِ رَكْعَةً قَبْلَ أَنْ تَغْرُبَ الشَّمْسُ فَقَدْ أَدْرَكَ وَمَنْ أَدْرَكَ مِنَ الْفَجْرِ رَكْعَةً قَبْلَ أَنْ تَطْلُعَ الشَّمْسُ فَقَدْ أَدْرَكَ ‏"‏ ‏.‏
Reference : Sahih Muslim 608c
In-book reference : Book 5, Hadith 211
USC-MSA web (English) reference : Book 4, Hadith 1266
  (deprecated numbering scheme)