Answered by Shaykh Abu Usamah
What should a person do if they join the congregational prayer late and accidentally follow the imam and make salam before they complete their missed raka’s? Is there any difference if they made both salams or one only?
Al-Salam alaykum
After forgetfully making the salam, if he has not done anything that invalidates salah (like talking etc.) he must stand and complete his missed rak`ahs with sajdah al-sahw at the end.
The same law applies whether he made one or two salams.
Abu Usamah