Anas (May Allah be pleased with him) reported: We returned with the Prophet (PBUH) from a journey; and when we entered the suburbs of Al-Madinah, he (PBUH) said: "Ayibuna, taibuna, `abiduna, li-Rabbina hamidun (We are returning in safety, turning to our Rubb, worshipping Him and praising Him)." He (PBUH) continued repeating these words till we entered Al-Madinah.[Muslim].
When one returns from a journey and sees his town's highlights, he should start reciting the invocation mentioned in this Hadith till he enters the city. These words express gratitude to Allah for safe return to one's hometown; they also express repentance, obedience and determination to worship Allah.