Assalaamu alaykum. I was praying the ‘Asr prayer and got to the last unit of prayer and was saying the Tahiyyaat. Because I have a speech problem, I got delayed on the Tahiyyaat, and the imam performed Sujood Sahw (prostration of forgetfulness). I performed the Sujood Sahw with him and the congregation but then afterwards (before the Salam) did the Tahiyyaat, the Tashahud, and the exaltations on the Prophet, sallallaahu ‘alayhi wa sallam, and then did the Salam. Is my prayer valid?
All perfect praise be to Allah, The Lord of the worlds. I testify that there is none worthy of worship except Allah and that Muhammad, sallallaahu ‘alayhi wa sallam, is His slave and Messenger.
What you did of doing the Sujood as-Sahw along with the imaam is valid according to the Hanbali School. Then you should have completed the Tahiyyaat from the place at which you stopped instead of repeating the whole Tahiyyaat. Shaykh Muhammad ibn ‘Abd Al-Wahhaab said, "The person being led in the prayer is not required to perform Sujood as-Sahw unless the imaam performs it, even if he had not finished saying the Tashahhud; then he finishes it after the Sujood." [Aadaab Al-Mashi ila As-Salaah]
In any case, your prayer is valid in light of this information, but you should beware of Waswaas (obsessive whisperings). You should totally disregard them, as getting carried away with them leads to evil consequences.
Allah knows best.
You can search for fatwa through many choices