"The Messenger of Allah ﷺ said: 'If one of you is not sure about his prayer, let him estimate and prostrate twice after he has finished." (Using translation from Nasāʾī 1241)
قَالَ رَسُولُ اللهِ ﷺ «إِذَا شَكَّ أَحَدُكُمْ فِي صَلَاتِهِ فَلْيَتَحَرَّ وَلْيَسْجُدْ سَجْدَتَيْنِ بَعْدَمَا يَفْرُغُ»