It is recommended to pray two rak`ah in the masjid for one who has come from a journey, when he first arrives
حَدَّثَنَا عُبَيْدُ اللَّهِ بْنُ مُعَاذٍ، حَدَّثَنَا أَبِي، حَدَّثَنَا شُعْبَةُ، عَنْ مُحَارِبٍ، سَمِعَ جَابِرَ بْنَ عَبْدِ اللَّهِ، يَقُولُ اشْتَرَى مِنِّي رَسُولُ اللَّهِ صلى الله عليه وسلم بَعِيرًا فَلَمَّا قَدِمَ الْمَدِينَةَ أَمَرَنِي أَنْ آتِيَ الْمَسْجِدَ فَأُصَلِّيَ رَكْعَتَيْنِ .
Jabir b. 'Abdullah reported: The Messenger of Allah (ﷺ) bought a camel from me. When he came back to Medina, he ordered me to come to the mosque and observed two rak'ahs of prayer.