Answered by Shaykh Faraz Rabbani
What if I am in the middle of the 3rd rakaat of my prayer when I realize that I had only intended for 2 (and that’s really all I was supposed to do)? do I just sit down and “finish up”? or do I just continue through my prayer now that I have already begun the extra rakaat?
Walaikum assalam,
If it is a voluntary (nafl) prayer, one may complete it as four rakats.
If the obligatory fajr prayer (which is the only obligatory 2 rakat prayer), or the confirmed sunna of fajr, one should simply sit down immediately. However, because one has left the wajib of not changing the necessary form of the prayer, one must perform forgetfulness prostrations. [See (http://www.SunniPath.com) for details]
And Allah alone gives success.
Wassalam,
Faraz Rabbani