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.
Your reciting of the Tashahhud with the Imam, then standing up to make up for the missed Rak'ah (unit of prayer) after the Imam's tasleem is correct. If that's what you did, then your prayer is valid.
Furthermore, it is obligatory for you to know the rulings of the obligatory acts like the rulings of purification, the prayer, zakat, fasting, and similar obligations.
Allah knows best.