Ka'b bin Malik (May Allah be pleased with him) reported:
Whenever the Messenger of Allah (ﷺ) returned from a journey, he would proceed straight to the mosque and perform two Rak'ah of (optional) prayer.[Al-Bukhari and Muslim]. (JA)
App reference (JA): Book 8, Hadith 33 (JA)
Arabic/English book reference (JA): Book 8, Hadith 988 (JA)