Abu Nadrah (may Allah have mercy on him) said: A young man asked Sayyiduna Imran bin Husayn (may Allah be pleased with him) about the prayer of the Prophet (peace and blessings be upon him) while travelling, and he said: This young man is asking me about the travel prayer of the Prophet (peace and blessings be upon him), so you too memorise it from me. Whenever I travelled with the Prophet (peace and blessings be upon him), he (peace and blessings be upon him) prayed two rak'ahs until he returned. I was present with him (peace and blessings be upon him) at Hunayn and al-Ta'if, and he (peace and blessings be upon him) prayed two rak'ahs. Then I performed Hajj and Umrah with him (peace and blessings be upon him), and he (peace and blessings be upon him) prayed two rak'ahs, and he (peace and blessings be upon him) said: "O people of Makkah, complete your prayer, for we are travellers." Then I performed Hajj and Umrah with Sayyiduna Abu Bakr (may Allah be pleased with him), and he prayed two rak'ahs each time and said: "O people of Makkah, complete your prayer, for we are travellers." Then I performed Hajj and Umrah with Sayyiduna Umar (may Allah be pleased with him), and he prayed two rak'ahs each time, then said: "O people of Makkah, complete your prayer, for we are travellers." Then I performed Hajj and Umrah with Sayyiduna Uthman (may Allah be pleased with him), and he too prayed two rak'ahs; then Sayyiduna Uthman (may Allah be pleased with him) prayed the complete prayer.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الصلاة / 5387