عَنْ عَبْدِ اللَّهِ بْنِ جَعْفَرٍ رَضِيَ اللَّهُ عَنْهُ أَنَّ رَسُولَ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَآلِهِ وَسَلَّمَ قَالَ: ((مَنْ شَكَّ فِي صَلَاتِهِ فَلْيَسْجُدْ سَجْدَتَيْنِ بَعْدَ مَا يُسَلِّمُ))
It is narrated from Sayyiduna Abdullah bin Ja'far (may Allah be pleased with him) that the Messenger of Allah (peace and blessings be upon him) said: If a person has doubt in his prayer, then after saying salam he should perform two prostrations.