Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
tirmidhi:552Muḥammad

"I prayed with the Prophet both, while a resident and while traveling. So I prayed four for Zuhr with him as a resident, and two Rak'ah after it. I prayed two Rak'ah for Zuhr with him while traveling and two Rak'ah after it, and two Rak'ah for Asr, and he did not pray anything after it. Maghrib while a resident and traveling is the same; three Rak'ah, it is not decreased as a resident nor while traveling. It is Witr of the day, and after it are two Rak'ah."  

الترمذي:٥٥٢حَدَّثَنَا مُحَمَّدُ بْنُ عُبَيْدٍ الْمُحَارِبِيُّ يَعْنِي الْكُوفِيَّ حَدَّثَنَا عَلِيُّ بْنُ هَاشِمٍ عَنِ ابْنِ أَبِي لَيْلَى عَنْ عَطِيَّةَ وَنَافِعٍ عَنِ ابْنِ عُمَرَ قَالَ

صَلَّيْتُ مَعَ النَّبِيِّ ﷺ فِي الْحَضَرِ وَالسَّفَرِ فَصَلَّيْتُ مَعَهُ فِي الْحَضَرِ الظُّهْرَ أَرْبَعًا وَبَعْدَهَا رَكْعَتَيْنِ وَصَلَّيْتُ مَعَهُ فِي السَّفَرِ الظُّهْرَ رَكْعَتَيْنِ وَبَعْدَهَا رَكْعَتَيْنِ وَالْعَصْرَ رَكْعَتَيْنِ وَلَمْ يُصَلِّ بَعْدَهَا شَيْئًا وَالْمَغْرِبَ فِي الْحَضَرِ وَالسَّفَرِ سَوَاءً ثَلاَثَ رَكَعَاتٍ لاَ تَنْقُصُ فِي الْحَضَرِ وَلاَ فِي السَّفَرِ وَهِيَ وِتْرُ النَّهَارِ وَبَعْدَهَا رَكْعَتَيْنِ  

قَالَ أَبُو عِيسَى هَذَا حَدِيثٌ حَسَنٌ سَمِعْتُ مُحَمَّدًا يَقُولُ مَا رَوَى ابْنُ أَبِي لَيْلَى حَدِيثًا أَعْجَبَ إِلَىَّ مِنْ هَذَا وَلاَ أَرْوِي عَنْهُ شَيْئًا

See similar narrations below:

Collected by Aḥmad
ahmad:5634Yaḥyá b. Ādam > Ḥasan / Ibn Ṣāliḥ > Firās

[Machine] I prayed with the Messenger of Allah ﷺ both in times of residence and travel. He prayed four units for Dhuhr prayer during residence, followed by two units. He prayed four units for Asr prayer during residence, with no additional units after it. He prayed three units for Maghrib prayer during residence, followed by two units. He prayed four units for Isha prayer during residence. During travel, he prayed two units for Dhuhr prayer, followed by two units. He prayed two units for Asr prayer, with no additional units after it. He prayed three units for Maghrib prayer during travel, followed by two units. He prayed two units for Isha prayer, followed by two units.  

أحمد:٥٦٣٤حَدَّثَنَا يَحْيَى بْنُ آدَمَ حَدَّثَنَا حَسَنٌ يَعْنِي ابْنَ صَالِحٍ عَنْ فِرَاسٍ عَنْ عَطِيَّةَ الْعَوْفِيِّ عَنِ ابْنِ عُمَرَ قَالَ

صَلَّيْتُ مَعَ رَسُولِ اللهِ ﷺ فِي الْحَضَرِ وَالسَّفَرِ فَصَلَّى الظُّهْرَ فِي الْحَضَرِ أَرْبَعًا وَبَعْدَهَا رَكْعَتَيْنِ وَصَلَّى الْعَصْرَ أَرْبَعًا وَلَيْسَ بَعْدَهَا شَيْءٌ وَصَلَّى الْمَغْرِبَ ثَلَاثًا وَبَعْدَهَا رَكْعَتَيْنِ وَصَلَّى الْعِشَاءَ أَرْبَعًا وَصَلَّى فِي السَّفَرِ الظُّهْرَ رَكْعَتَيْنِ وَبَعْدَهَا رَكْعَتَيْنِ وَالْعَصْرَ رَكْعَتَيْنِ وَلَيْسَ بَعْدَهَا شَيْءٌ وَالْمَغْرِبَثَلَاثًا وَبَعْدَهَا رَكْعَتَيْنِ وَالْعِشَاءَ رَكْعَتَيْنِ وَبَعْدَهَا رَكْعَتَيْنِ