Sayyiduna Abu Hurayrah (may Allah be pleased with him) narrates that the Messenger of Allah (peace and blessings be upon him) led the Zuhr or Asr prayer with (by forgetfulness) two rak'ahs. Dhu al-Yadayn (may Allah be pleased with him) said: O Messenger of Allah, have you forgotten, or has the prayer been shortened? The Messenger of Allah (peace and blessings be upon him) asked the Companions (may Allah be pleased with them): "Is Dhu al-Yadayn speaking correctly?" They said: Yes. So he (peace and blessings be upon him) led two more rak'ahs and performed the two prostrations of forgetfulness. Sa'd bin Ibrahim (may Allah have mercy on him) narrates that Urwah bin al-Zubayr (may Allah have mercy on him) prayed two rak'ahs of Maghrib and said the salam, then spoke, and after performing the remainder (one rak'ah) he said: The Messenger of Allah (peace and blessings be upon him) also did it this way.
The complete discussion of this issue will come in the chapter on the prostration of forgetfulness, if Allah wills.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الصلاة / 3353