La ilaha illallahu wahdahu la sharika lah, lahul-mulku wa lahul-hamd, wa huwa 'ala kulli shay'in qadir. La ilaha illallahu wahdah, anjaza wa'dah, wa nasara 'abdah, wa hazamal-ahzaba wahdah.
Meaning
There is no god but Allah alone, with no partner. His is the dominion and His is the praise, and He has power over all things. There is no god but Allah alone; He fulfilled His promise, helped His servant and alone defeated the confederates.
Sahih Muslim 1218
Prayer while travelling — Hanafi school
You stay under 15 days in Makkah and in Madinah, so you are a traveller for the whole trip. Praying alone, the four-rak'ah obligatory prayers become two.
Prayer
Alone, or behind a travelling imam
Behind the imam of the Haram or the Prophet's Mosque
Fajr
2
2
Dhuhr
2
4 — full, with the imam
Asr
2
4 — full, with the imam
Maghrib
3
3
Isha
2
4 — full, with the imam
Never shorten behind the imamThe imams of the Haram and the Prophet's Mosque are residents. Behind them, pray Dhuhr, Asr and Isha as four rak'ahs — do not end the prayer after two.
Fajr stays two and Maghrib three — travel does not change them.
In the Hanafi school Witr is three rak'ahs. How to pray Witr behind the Haram imam in Ramadan, and which sunnah prayers to keep while travelling, are best asked of your scholar; it is best not to leave the Fajr sunnah.
If you intend to stay 15 days or more in one city, you are no longer a traveller there — pray in full.
Surah an-Nisa 4:101; Sahih al-Bukhari 1081; Sahih Muslim 688