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