The World Federation One Stop Fiqh

Ruling 1448

If a follower inadvertently says the salām of the prayer before the imam, his prayer is valid and it is not necessary that he say the salām again along with the imam. In fact, there is no problem even if he intentionally says the salām before the imam.