Once Allah's Messenger (ﷺ) offered two rak`at and finished his prayer. So Dhul-Yadain asked him, "Has the prayer been reduced or have you forgotten?" Allah's Messenger (ﷺ) said, "Has Dhul-Yadain spoken the truth?" The people replied in the affirmative. Then Allah's Messenger (ﷺ) stood up and offered the remaining two rak`at and performed Taslim, and then said Takbir and performed two prostrations like his usual prostrations, or a bit longer, and then got up.
Forgetfulness in Prayer - Sahih al-Bukhari 1228
Once Allah's Messenger (ﷺ) offered two rak`at and finished his prayer. So Dhul-Yadain asked him, "Has the prayer been reduced or have you forgotten?" Allah's Messenger (ﷺ) said, "Has Dhul-Yadain spoken the truth?" The people replied in the affirmative. Then Allah's Messenger (ﷺ) stood up and offered the remaining two rak`at and performed Taslim, and then said Takbir and performed two prostrations like his usual prostrations, or a bit longer, and then got up.
Scholarly Commentary
This hadith establishes the sunnah of performing prostrations of forgetfulness (sujud al-sahw) when a deficiency occurs in prayer. The Prophet's acceptance of correction from an ordinary companion demonstrates the collective responsibility in preserving prayer's correctness.
Dhul-Yadain's questioning shows the permissibility of reminding the imam discreetly. The Prophet's verification before acting teaches us to confirm matters before proceeding. His completion of the missed rak'at followed by sujud al-sahw illustrates the proper sequence for rectifying prayer omissions.
The prostrations being "like his usual prostrations, or a bit longer" indicates flexibility in their duration while maintaining their essential form. This incident forms the primary textual evidence for the legislation of prostrations of forgetfulness in Islamic jurisprudence.