Imam Al-Nawawi’s Riyad-us-Saliheen
Desirability of Entering the Mosque near one’s Home upon returning from a
Journey for offering two Rak’ah Prayer
988. Ka`b bin Malik (May Allah be pleased with him) reported: Whenever the Messenger of Allah (sallallaahu alayhi wa sallam) returned from a journey, he would proceed straight to the mosque and perform two Rak`ah of (optional) prayer.
[Al-Bukhari and Muslim].