Anas b. Malik reported
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).