Sunan an-Nasa'i 779
Grading supplied with this record: Sahih (Darussalam)
Narration text is preserved in its supplied Arabic and English. Translated interfaces and reading guides do not add narration translations in other languages.
لَعَلَّكُمْ سَتُدْرِكُونَ أَقْوَامًا يُصَلُّونَ الصَّلاَةَ لِغَيْرِ وَقْتِهَا فَإِنْ أَدْرَكْتُمُوهُمْ فَصَلُّوا الصَّلاَةَ لِوَقْتِهَا وَصَلُّوا مَعَهُمْ وَاجْعَلُوهَا سُبْحَةً "
It was narrated that 'Abdullih said:
"The Messenger of Allah (ﷺ) said: 'You may live to meet people who will be offering the prayer outside its (prayer) time. If you meet them, then offer the prayer on time, then pray with them and make that a voluntary prayer."'
Full reference and source
Sunan an-Nasa'i 779 In-book : Book 10, Hadith 3 English translation : Vol. 1, Book 10, Hadith 780
View source on Sunnah.com (opens in a new tab)