The Book of Forgetfulness (In Prayer)
13/25. Chapter:
Estimating (what is most likely the case)
Sunan an-Nasai
أَخْبَرَنَا مُحَمَّدُ بْنُ هَاشِمٍ، أَنْبَأَنَا الْوَلِيدُ، أَنْبَأَنَا ابْنُ جُرَيْجٍ، عَنْ عَبْدِ اللَّهِ بْنِ مُسَافِعٍ، عَنْ عُتْبَةَ بْنِ مُحَمَّدِ بْنِ الْحَارِثِ، عَنْ عَبْدِ اللَّهِ بْنِ جَعْفَرٍ، أَنَّ رَسُولَ اللَّهِ صلى الله عليه وسلم قَالَ " مَنْ شَكَّ فِي صَلاَتِهِ فَلْيَسْجُدْ سَجْدَتَيْنِ بَعْدَ التَّسْلِيمِ " .
It was narrated 'Abdullah bin Ja'far that: The Messenger of Allah (ﷺ) said: "Whoever has doubt during his prayer, let him prostrate twice after he said the taslim."
Reference : Sunan an-Nasa'i 1249In-book reference : Book 13, Hadith 71English translation : Vol. 2, Book 13, Hadith 1250