The Messenger of Allah ﷺ became absent-minded and ended the prayer with the salam after only two rakats. A man called Dhul-Yadayn said to him, "Messenger of Allah, has the prayer been shortened, or did you forget?"He replied, "It has not been shortened, nor did I forget."Dhul-Yadayn said, "Then you have prayed only two rakats."The Prophet ﷺ turned to the others and asked, "Is it as Dhul-Yadayn says?"They answered, "Yes."So he stepped forward and prayed two more rakats, then made the salam, then performed two prostrations for forgetfulness.
أن رسول الله ﷺ سها فسلم في الركعتين، فقال له رجل يقال له ذو اليدين: يا رسول الله! أقصرت أو نسيت؟ قال: ما قصرت وما نسيت قال: إذا فصليت ركعتين. قال: أكما يقول ذو اليدين؟ قالوا: نعم. فتقدم فصلى ركعتين، ثم سلم، ثم سجد سجدتي السهو.
Abu Dawud (1017) and Ibn Majah (1213) narrated it from Abu Kurayb Hamdani, from Abu Usama, from Ubaydullah bin Umar, from Nafi, from Ibn Umar, who related something similar. The wording given is Ibn Majah's, since Abu Dawud referred back to the wording of the hadith of Abu Hurairah. Its chain is sahih. Abu Usama is Hammad bin Usama Qurashi, their client, the Kufan, Abu Usama, known by his kunya, one of the narrators accepted by all the compilers of hadith. Abu Kurayb is Muhammad bin Ala bin Kurayb Hamdani, Abu Kurayb, known by his kunya, and also one of the narrators accepted by all the compilers.Ibn Khuzayma (1034) also recorded it from Muhammad bin Ala Hamdani, Abu Kurayb, and Bishr bin Khalid Askari, both of them from Abu Usama with the same wording. He said, "This is a report that no one narrated from Abu Usama except Abu Kurayb and Bishr bin Khalid."I say, this is not as he said, for it was also narrated by Ahmad bin Muhammad bin Thabit, who is trustworthy, Abu Dawud narrating it from him, and by Ahmad bin Sinan Qattan, who is among the most reliable and trustworthy narrators, and by Ali bin Muhammad bin Ishaq Tanafisi, a trustworthy and devout worshipper, Ibn Majah narrating from both of them.Zaylai criticized Daraqutni for his statement, "We do not know of anyone who narrated it besides Ahmad bin Sinan," saying, "It is astonishing that Daraqutni, with his elevated rank, would say such a thing, when it was narrated by Abu Kurayb, Ahmad bin Thabit, and Bishr bin Khalid. But he found a way out with his phrase, 'We do not know,' and Allah knows best." End of quote, from Nasb Raya (68/2).Dhul-Yadayn was Sulami, also called Khirbaq, as will come in the hadith of Imran bin Husayn from Muslim. He was named Dhul-Yadayn because of the length of his arms, which he made use of. He remained after the death of the Prophet ﷺ narrating this hadith, and he died during the caliphate of Umar.As for what Malik narrated in the Book of Prayer (60), from Ibn Shihab, from Abu Bakr bin Sulayman bin Abu Hathma, who said, "It has reached me that the Messenger of Allah ﷺ performed two rakahs of one of the two daytime prayers, Dhuhr or Asr, and gave the salam after two." Then Dhul-Shimalayn said to him... and the rest of the hadith.Dhul-Shimalayn was Umayr bin Amr bin Ghubshan Khuzai, who was killed on the day of Badr, and he is not the same person who spoke in the hadith of the forgetful prayer. This is the view of the hadith masters, except Zuhri, who said, "He is the same person." But they agreed that Zuhri erred in this, and that no one followed him on it.Hafiz bin Abdul-Barr said, "Even though Zuhri was a great imam in this field, no human being is free from error, and perfection belongs to Allah Most High."I have discussed the identification of Dhul-Yadayn at length in Minna Kubra (2/476–479), so refer to it if you wish for more.