Sayyiduna Abu Hurayrah (may Allah be pleased with him) says: I travelled with the Prophet (peace and blessings be upon him), with Sayyiduna Abu Bakr, and with Sayyiduna Umar (may Allah be pleased with him). All of them, from the time they left Madinah until they returned there, would pray two rak'ahs during the journey, and also while staying in Makkah (they would pray two rak'ahs).
Abu Ya'la and al-Tabarani in al-Mu'jam al-Awsat recorded it; the narrators of Abu Ya'la are the narrators of the Sahih.
Hadith Referenceمجمع الزوائد ومنبع الفوائد / كتاب الصلاة / 2946