Abu Zubayr reported,

Ali al-Azdi reported that Ibn Umar taught him that whenever the Messenger of Allah ﷺ mounted his camel to set out on a journey, he would say "Allahu Akbar" three times, then recite, "Glory be to Him who has subjected this to us, for we could never have accomplished it ourselves, and indeed to our Lord we shall return" [Zukhruf 43:13–14].Then he would say, "O Allah, I ask You on this journey of ours for righteousness, piety, and deeds that please You. O Allah, make this journey easy for us and shorten its distance for us. O Allah, You are the Companion on the journey and the Guardian of the family and property left behind."When he returned, he would say the same words and add to them, "Returning, repenting, worshipping, and praising our Lord."Whenever the Prophet ﷺ and his armies climbed a mountain pass, they would proclaim "Allahu Akbar," and when they descended, they would say "Subhan Allah." The prayer was structured upon this pattern.

Abu Dawud 2599

Sahih

حدثنا الحسن بن علي حدثنا عبد الرزاق أخبرنا ابن جريج

أخبرني أبو الزبير

أن عليا الأزدي أخبره أن ابن عمر علمه أن رسول الله ﷺ كان إذا استوى على بعيره خارجا إلى سفر كبر ثلاثا ثم قال {سبحان الذي سخر لنا هذا وما كنا له مقرنين وإنا إلى ربنا لمنقلبون} اللهم إني أسألك في سفرنا هذا البر والتقوى ومن العمل ما ترضى اللهم هون علينا سفرنا هذا اللهم اطو لنا البعد اللهم أنت الصاحب في السفر والخليفة في الأهل والمال وإذا رجع قالهن وزاد فيهن آيبون تائبون عابدون لربنا حامدون وكان النبي ﷺ وجيوشه إذا علوا الثنايا كبروا وإذا هبطوا سبحوا فوضعت الصلاة على ذلك

أبو داود 2599صحيح
Contents
Reference
Commentary
Ayat
Collection
Sunan Abu Dawud
Book
Jihad
Chapter
What a man says when he travels
Numbering
Darussalam 2599
Abu Dawud 2599