Wasalamo`Alaykum Wa Rahmatullahi Wa Barakaatuh,
Either way is right. You can do it both ways:
a) Pray two rakah, sit in tashahhud in your second rakah, say salam. Say the opening takbeer, pray another rakah, sit in tashahhud, and perform tasleem i.e say salam again.
b) Pray three rakah in total with one opening takbeer, sit in tashahhud in second rakah but you get up for the third rakah without tasleem, then perform the third rakah, tashahhud and final tasleem.
So, two tashahhuds and two salams and two takbeers in the first method, and one takbeer and tasleem in the second method with two tashahhud. Hopefully I didn't confuse you furthur.
Salam alaikum,
Actually option B isn't correct. That's actually a restricted method of praying Witr (one that is very common throughout the world ironically).
The Prophet salallahu alayhi wassalam said: “Do not pray Witr with three rak’ahs that resemble Maghrib.” What he (peace and blessings of Allaah be upon him) meant, as the scholars have explained, was that we should not sit to recite the first Tashahhud in a manner that resembles Maghrib.
So if you're going to pray 3 raka'at, you only make tashahhud in the last rak'ah. Making it in the second one resembles the Maghrib salah and that is restricted.
Option A is the most preferred method but we have been told to alternate our forms of Witr prayer because the Prophet salallahu alayhi wassalam prayed them differently every night.
Here's the daleel:
http://islam-qa.com/en/38230
Praying Witr Resembling Maghrib
Praise be to Allaah.
It was proven that the Prophet (peace and blessings of Allaah be upon him) prayed Witr in different ways. He prayed one rak’ah, and three, and five, and seven, and nine. And he prayed three rak’ahs in two different ways, either continuously with one tashahhud, or saying salaam after two rak’ahs and praying one rak’ah and saying salaam after it. He did not pray it like Maghrib, with two tashahhuds and one salaam. Rather he forbade doing that, and said: “Do not pray Witr with three rak’ahs like Maghrib.” Narrated by al-Haakim, 1/403; al-Bayhaqi, 3/31; al-Daaraqutni, p. 172. Al-Haafiz ibn Hajar said in Fath al-Baari (4/301): Its isnaad fulfils the conditions of the two Shaykhs (al-Bukhaari and Muslim).
Shaykh Muhammad al-Saalih al-‘Uthaymeen said:
It is permissible to pray Witr with three rak’ahs, or with five, or with seven, or with nine. If a person prays Witr with three, it may be done in one of two ways, both of which are prescribed in sharee’ah:
1 – Praying the three rak'ahs continually with one tashahhud.
2 – Saying salaam after two rak’ahs, then praying one rak’ah on its own.
Both of these are narrated in the Sunnah, so if a person does it one way sometimes and the other way sometimes, that is good.
…
It is permissible to say it with one salaam, but it should be with only one tashahhud and not two, because if he does it with two tashahhuds, it will be like Maghrib prayer, and the Prophet (peace and blessings of Allaah be upon him) forbade making it like Maghrib prayer.
Al-Sharh al-Mumti’, 4/14-16
For more information please see question no. 26844 and 3452, where there is a lengthy and detailed discussion about qiyaam (night prayers) and Witr.