Abu Dawud Book 2, Hadith Number 1023.

Chapter : Not known.

Narated By Abdullah ibn Mas’ud : AbuUbaydah reported, on the authority of his father Abdullah (ibn Mas’ud), the Apostle of Allah (PBUH) as saying: When you offer the prayer, and you are in doubt about the number of rak’ahs whether offered three or four, and you have prayed four rak’ahs in all probability in your opinion, you should recite tashahhud and make two prostrations while you are sitting before giving the salutation. afterwards you should recite the tashahhud and give the salutation again.