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.