It is narrated from Sayyiduna Abdullah bin Mas'ud, may Allah be pleased with him, who says: I performed two rak'ahs with the Prophet, peace and blessings be upon him, during a journey, and also with Sayyiduna Abu Bakr and Sayyiduna Umar, may Allah be pleased with them both. Then the ways became different. By Allah! If even two out of these four are accepted by Allah for me, I would love it very much.
Related hadith on this topic