Jabir bin Abdullah reported,

I set out with the Messenger of Allah ﷺ on a military expedition, but my camel grew slow and exhausted. The Messenger of Allah ﷺ arrived back before me, and I arrived the following morning. I came to the mosque and found him at its door.He asked, "Have you just arrived?"I replied, "Yes."He said, "Then leave your camel and go in and pray two rakahs."So I went in, prayed, and then returned.

Muslim 1658

Sahih

و حدثني محمد بن المثنى حدثنا عبد الوهاب يعني الثقفي حدثنا عبيد الله عن وهب بن كيسان

عن جابر بن عبد الله قال

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

مسلم 1658صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Muslim
Book
Travelers' prayer and its shortening
Chapter
Recommendation of praying two rakahs in the masjid upon returning from a journey at the time of arrival
Numbering
Darussalam 1658
Muslim 1658