Whenever the Prophet ﷺ traveled and mounted his riding animal, he would say "Allah is the greatest" three times, then recite, "Glory be to Him who has subjected this to us, for we could never have done it by ourselves, and indeed to our Lord we will return" [Zukhruf 43:13–14].Then he would say, "O Allah, I ask You on this journey of mine for righteousness, mindfulness of You, and deeds that please You. O Allah, make this journey easy for us and shorten its distance. O Allah, You are the Companion on the journey and the Guardian over the family. O Allah, accompany us on our journey and watch over our family in our absence."When he returned to his family, he would say, "We return, if Allah wills, repenting, worshipping, and praising our Lord."
حدثنا سويد بن نصر أخبرنا عبد الله بن المبارك حدثنا حماد بن سلمة عن أبي الزبير عن علي بن عبد الله البارقي
أن النبي ﷺ كان إذا سافر فركب راحلته كبر ثلاثا ويقول {سبحان الذي سخر لنا هذا وما كنا له مقرنين وإنا إلى ربنا لمنقلبون} ثم يقول اللهم إني أسألك في سفري هذا من البر والتقوى ومن العمل ما ترضى اللهم هون علينا المسير واطو عنا بعد الأرض اللهم أنت الصاحب في السفر والخليفة في الأهل اللهم اصحبنا في سفرنا واخلفنا في أهلنا وكان يقول إذا رجع إلى أهله آيبون إن شاء الله تائبون عابدون لربنا حامدون
Muslim also narrated it in the Book of Hajj, chapter titled "The recommendation of remembrance when mounting one's riding animal setting out on a journey for Hajj or otherwise..." etc, hadith no. 1342, from the hadith of Abu Zubayr, with the same wording.