It is narrated from Amr bin Haram (may Allah have mercy on him) that Jabir bin Yazid (may Allah have mercy on him) was asked about the times of the prayer, and he said that Sayyiduna Abu Hurayrah (may Allah be pleased with him) stated that "He prayed with the Messenger of Allah (peace and blessings be upon him), during the journey to Makkah and during the stay in Makkah until the return to Madinah, only two rak'ahs each." Imam al-Tayalisi recorded this hadith, and all its narrators are thiqat (trustworthy). The wording of Imam Abu Ya'la's narration is that Sayyiduna Abu Hurayrah (may Allah be pleased with him) used to say: "I travelled with the Messenger of Allah (peace and blessings be upon him), Sayyiduna Abu Bakr and Sayyiduna Umar (may Allah be pleased with them both), and all of them, from leaving Madinah until returning, used to pray only two rak'ahs each, both while journeying and during the stay in Makkah."
Hadith Referenceإتحاف الخيرة المهرة بزوائد المسانيد العشرة / كتاب قصر الصلاة / 1557