When the Messenger of Allah ﷺ set out on a journey before the sun declined (from the meridian), he delayed the noon prayer till the afternoon prayer, and then dismounted (his ride) and combined them (noon and afternoon prayers), but if the sun had declined before his setting out on a journey, he observed the noon prayer and then mounted (the ride).
كَانَ رَسُولُ اللَّهِ ﷺ إِذَا ارْتَحَلَ قَبْلَ أَنْ تَزِيغَ الشَّمْسُ أَخَّرَ الظُّهْرَ إِلَى وَقْتِ الْعَصْرِ ثُمَّ نَزَلَ فَجَمَعَ بَيْنَهُمَا فَإِنْ زَاغَتِ الشَّمْسُ قَبْلَ أَنْ يَرْتَحِلَ صَلَّى الظُّهْرَ ثُمَّ رَكِبَ