Zayd bin Aslam reported,

The Prophet ﷺ said, "If any of you is uncertain about his prayer, and he is sure that he has prayed three rakats, let him stand and complete one more rakah with its prostrations, then sit and recite the tashahhud. When he finishes and nothing remains but to give the salam, let him perform two prostrations while seated, then give the salam."Then he mentioned the meaning of Malik's narration.

Abu Dawud 1027

Sahih

حدثنا قتيبة حدثنا يعقوب بن عبد الرحمن القاري

عن زيد بن أسلم بإسناد مالك قال

إن النبي ﷺ قال إذا شك أحدكم في صلاته فإن استيقن أن قد صلى ثلاثا فليقم فليتم ركعة بسجودها ثم يجلس فيتشهد فإذا فرغ فلم يبق إلا أن يسلم فليسجد سجدتين وهو جالس ثم ليسلم ثم ذكر معنى مالك

أبو داود 1027صحيح
Contents
Reference
Commentary
Ayat
Collection
Sunan Abu Dawud
Book
Prayer
Chapter
If uncertain between two and three, one who says to disregard the doubt
Numbering
Darussalam 1027