In the Name of Allah, Most Gracious, Most Merciful.
All praise and thanks are due to Allah, and peace and blessings be upon His Messenger.
In this fatwa:
1- It is permissible to offer Witr prayer with three rakahs, or with five, or with seven, or with nine.
2- If a person prays Witr with three, it may be done in one of two ways; praying the three rakahs continually with one tashahhud or saying salam after two rakahs, then praying one rakah on its own.
3- Prophet Muhammad forbade praying Witr like Maghrib prayer.
Answering your question, the Fatwa Center at Islam Q and A, states:
How the Prophet Prayed Witr
Prophet Muhammad (peace be upon him) offered Witr prayer in different ways. He prayed one rakah, and three, and five, and seven, and nine. He also prayed three rakahs in two different ways, either continuously with one tashahhud, or saying salam after two rakahs and praying one rakah and saying salam after it.
The Prophet did not observe Witr Prayer it like Maghrib, with two tashahhuds and one salam. Rather he forbade doing that.
Prophet Muhammad said: “Do not pray Witr prayer with three rakahs like Maghrib.” (Al-Hakim, Al-Bayhaqi, and Al-Daraqutni) Ibn Hajar said: Its chain of transmission fulfils the conditions of the two Imams; Al-Bukhari and Muslim.
The late Sheikh Ibn `Uthaymeen said:
It is permissible to pray Witr with three rakahs, 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 Shariah:
1- Praying the three rakahs continually with one tashahhud.
2- Saying salam after two rakahs, then praying one rakah 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 salam, 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 forbade making it like Maghrib prayer. (Al-Sharh al-Mumti, 4/14-16)
Almighty Allah knows best.