"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." (Using translation from Nasāʾī 1240)
عَنْ عَبْدِ اللهِ يَرْفَعُهُ إِلَى النَّبِيِّ ﷺ قَالَ «إِذَا شَكَّ أَحَدُكُمْ فِي صَلَاتِهِ فَلْيَتَحَرَّ الَّذِي يَرَى أَنَّهُ الصَّوَابُ فَيُتِمَّهُ ثُمَّ يَعْنِي يَسْجُدُ سَجْدَتَيْنِ»