The Shaykh (Al-Mufid), may Allah سبحانه وتعالى support him, said: "And if someone omits two prostrations from one rak’ah, he must repeat (the prayer) in all cases. But if he forgets one of them and then remembers it in the second rak’ah before bowing, he should lower himself, perform that prostration, then stand up and resume the recitation, or the glorification (tasbih) if he is in the last two rak’ahs, as we have previously explained. And if he does not remember it until after bowing in the second rak’ah, then he must make it up after the salam and perform two prostrations of forgetfulness (sajdatay al-sahw)."