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 prostate twice.” (Sahih).