During the expedition of Tabuk, when the Prophet ﷺ set out before the sun had passed its zenith, he would delay the noon prayer until he could combine it with the afternoon prayer, performing them together. When he set out after the sun had passed its zenith, he would advance the afternoon prayer to join it with the noon prayer, performing both together, and then continue his journey.Likewise, when he set out before sunset, he would delay the sunset prayer until he could perform it with the night prayer. When he set out after sunset, he would advance the night prayer and perform it together with the sunset prayer.
حدثنا قتيبة بن سعيد حدثنا الليث بن سعد عن يزيد بن أبي حبيب عن أبي الطفيل هو عامر بن واثلة
أن النبي ﷺ كان في غزوة تبوك إذا ارتحل قبل زيغ الشمس أخر الظهر إلى أن يجمعها إلى العصر فيصليهما جميعا وإذا ارتحل بعد زيغ الشمس عجل العصر إلى الظهر وصلى الظهر والعصر جميعا ثم سار وكان إذا ارتحل قبل المغرب أخر المغرب حتى يصليها مع العشاء وإذا ارتحل بعد المغرب عجل العشاء فصلاها مع المغرب
[Its chain is sahih]. Abu Dawud narrated it in the Book of Travel Prayer, Chapter on Combining the Two Prayers, hadith no. 1220, from Qutayba, with this wording. Ibn Hibban graded it sahih (al-Ihsan, 1456), as did Ibn Qayyim, though it was criticized on a point that does not undermine it.On this subject there are also reports from Ali [Abu Dawud, no. 1234], Ibn Umar [Bukhari, no. 1091, and Muslim, no. 703, coming up as no. 555], Anas [Bukhari, no. 1111, and Muslim, no. 704], Abdullah bin Amr [Ahmad, 2/179, 180], Ayesha [Ahmad, 6/135], Ibn Abbas [Muslim, no. 705], Usama bin Zayd [Bukhari, no. 1672, and Muslim, no. 1280], and Jabir bin Abdullah [Abu Dawud, no. 1215].