He is confused about how to make up two rak’ahs when he has missed both tashahhuds
Question

                I am one of those whom Allaah has blessed with guidance during this blessed month. I have given up a number of bad habits and I have started to adhere to my religion, but I am faced with some matters of which I am still ignorant, but they are essential parts of religion. My question has to do with prayer. All I know is that a worshipper has to make up whatever he has missed of rak’ahs after the imam says the tasleem, but I noticed that some worshippers who missed the same number of rak’ahs make them up in different ways, such as praying the two rak’ahs with two tashahhuds, whilst I make them up with one tashahhud, based on what I know. I hope that you can explain.
Praise be to Allah.
      Firstly: 

    We praise Allaah for having guided you and helped you to do 
    that which is good for you in this world and in the Hereafter. We ask Allaah 
    to reward you and make you steadfast. The blessing of guidance is the 
    greatest of blessings, for which you must be grateful. Part of being 
    grateful is to continue to follow that guidance and do good, and to continue 
    to keep away from everything that is bad and evil. 

    Remember that knowledge is light. You can look on this site 
    of our for some answers that have to do with knowledge, to read some advice 
    and suggestions of books from which you can benefit.  

    Secondly: 

    What you have seen some of your fellow worshippers doing, 
    making up two missed rak’ahs with two tashahhuds is not something strange in 
    some cases. The reason for that is that when the imam says the salaam, the 
    latecomer (the person who has missed part of the prayer with the imam) 
    should stand up and complete his prayer. So what he prayed with the imam is 
    the first part of his prayer, on the basis of which he should complete the 
    rest of his prayer, because the Prophet  (peace and blessings of Allaah 
    be upon him) said: “When you come to the prayer, you should be dignified 
    (and not rush). Whatever you catch up with, pray, and whatever you miss, 
    complete it.” Narrated by al-Bukhaari, 635; Muslim, 603. 

    For example: 

    If a man misses the first rak’ah of Maghrib with the imam, 
    and joins him in the second rak’ah, the second rak’ah for the imam is the 
    first rak’ah for this latecomer. When the imam has completed the prayer, 
    this latecomer should stand up and do the remaining rak’ah of his prayer 
    with al-Faatihah only, and sit to recite the Tashahhud and say the salaam. 

    If a person joins the imam in the third rak’ah of Maghrib, it 
    is the first rak’ah for him, so when the imam says the salaam, he should 
    stand up and do what is left of his prayer, so he should do one rak’ah with 
    al-Faatihah and another soorah, which will be the second rak’ah of his 
    prayer, after which he should sit to recite the first tashahhud, then stand 
    up to do the third rak’ah with al-Faatihah only, then sit to recite the last 
    tashahhud and the salaam… and so on. 

    See also question no. 49037 

    And Allaah knows best.