It was narrated 'Abdullah bin Ja'far that :
The Messenger of Allah (ﷺ) said: "Whoever has doubt during his prayer, let him prostrate twice after he said the taslim."