What do the expert scholars of shari’ah say: In the funeral prayer, if someone said Assalamu Alaykum wa Rahmatullah (the Salam to exit Salah) once after the final Takbir, but later realised he had forgotten to say a Takbir and thus said it now and then performed the Salam again, will this prayer be valid?
The prayer will only be valid when the first Salam was made accidentally or unintentionally. If someone made the first Salam deliberately thinking that there is only three Takbirs in the funeral prayer, then the prayer has become invalid.
And Allah ﷻ knows the best
Imam Ahmad Rida Khan رحمة الله تعالى عليه
Translation by Dr Musharraf Hussain Al-Azhari Translator of Majestic Quran, www.majesticquran.co.uk