When the Messenger of Allah ﷺ set out on a journey before the sun had passed its zenith, he would delay the noon prayer until the time of the afternoon prayer, then he would stop and combine the two. But if the sun passed its zenith before he set out, he would pray the noon prayer first and then ride on.
أخبرنا قتيبة قال حدثنا مفضل عن عقيل عن ابن شهاب
كان رسول الله ﷺ إذا ارتحل قبل أن تزيغ الشمس أخر الظهر إلى وقت العصر ثم نزل فجمع بينهما فإن زاغت الشمس قبل أن يرتحل صلى الظهر ثم ركب
Bukhari transmitted it in the Book of Shortening Prayer, in the chapter, "If he set out after the sun had declined, he would pray Dhuhr and then ride," hadith 1112, and Muslim in the Book of Prayer of the Traveler, in the chapter on the permissibility of combining the two prayers while traveling, hadith 704, from Qutayba bin Saeed with the same wording. It is also in Al-Kubra, hadith 1562.