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 is His slave and Messenger.
If you fumbled in the Taslim in prayer and you repeated As-Salam Alaikum; then your prayer is valid, and you do not have to prostrate for forgetfulness, unless you got up [finished prayer] before re-saying the Taslim and then you went back and said As-Salam Alaikum, then in this case you prostrate for forgetfulness before Taslim.
Imam Shafi’i said in (his book) Al-Umm: “The least sufficient form of one’s Taslim, is to say As-salam Alaikum. If he misses a letter from it, he returns and says As-salam again, and if he did not do it until he finished the prayer, he returns and prostrates for forgetfulness and then says As-salam Alaikum.
Allah knows best.