two rakaats

Performing two rakaats sunnat before zuhr due to the fardh salaah commencing

Q: I was offering the four rakat sunnat before zuhr in the mosque. I was offering the second rakat when the iqaamat started, so I completed my salah like a two rakah prayer to join the jamaat. Will I have to offer the sunnat again after zuhr or is it permissible to skip it? And also should I do sajdah sahw when I repeat the sunnah to after the jamaat?