Salim bin Abdullah (may Allah have mercy on him) narrates that Sayyiduna Abdullah bin Umar (may Allah be pleased with them both) used to say: When one of you has a doubt in his prayer, let him reflect on what he thinks he has forgotten of his prayer and pray it, and then at the end perform two prostrations while sitting.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الصلاة / 3810