It was narrated from 'Abdullah and attributed to the Prophet (ﷺ):"If one of you is not sure about his prayer, let him estimate what he thinks is most likely to be correct and complete the prayer on that basis, then let him prostrate twice
Hadith No. 1240
Sunan an Nasai
Gradings:
Abu Ghuddah:
Sahih
Al-Albani:
Sahih
Zubair Ali Zai:
Sahih - Agreed Upon