I am a musafir, i want to know how to Qasr a Magrhib during Isha time and how many rakaat and what will be my intention
First you should know that intention is in the heart, there's no backup in the sunnah that it must be uttered in any form. For details refer to Can niyat (intention) be done by heart, or must it be declared verbally?. So if you nevertheless consider uttering the niyyah you just have to place the word "qasr" قصر in the right place saying that you will pray prayer so and so qasran قصرا ... you may also add that it is due to being a traveller. Note that there's no prescribed wording for that as there's not even a backup for uttering it as what you are about to do is in your heart and mind not on your tongue. So far a general introduction I will quote some details later
Now if you want to pray maghrib and 'isha' qasr than you should know that qasr (shortening the prayer) literally only applies to 4-raka'a fard prayers:
Allah has prescribed the prayer through the word of your Prophet (ﷺ) as four rak'ahs when resident, two when travelling, and one when danger is present. (Sahih Muslim)
"Jumu'ah prayer is two rak'ahs, the prayer of Al-Fitr is two rak'ahs, the prayer of Al-Adha is two rak'ahs, the prayer when traveling is two rak'ahs, complete and not shortened, on the tongue of Muhammad (ﷺ)." (See for example in Sunan an-Nasa-i)
According to a report narrated by Ahmad (26338), the first thing to be enjoined upon the Messenger of Allah (blessings and peace of Allah be upon him) was prayer with two rak‘ahs each, except Maghrib, which was three rak‘ahs. Then Allah completed Zuhr, ‘Asr and ‘Isha’, making them four rak‘ahs when staying at home, and confirming the original obligation (of two rak‘ahs) when travelling.
Classed as hasan by the commentators on al-Musnad. (Source: islamqa #210538)
This means you may only shorten Dhohr, 'Asr and 'Isha'a from four raka'a to two raka'a. Imam an-Nawawi said in his al-Majmo' المجموع شرح المهذب:
In the following I will tranbslate from Arabic language, as these translations are of my own take them carefully!
فيجوز القصر في السفر في الظهر والعصر والعشاء ولا يجوز في الصبح والمغرب ولا في الحضر . (Source in Arabic)
It is permissible to shorten the prayer while traveling for Dhohr, 'Asr an 'isha and it is not permissible for Sobh and Maghrib nor when one has settled.
How to pray
Now that we know the amount of raka'a's for each prayer if shortened during travel we may move to how to pray them. Note that the fiqh views may differ: We have two/three possibilities:
Let me explain the joining of prayers (Jam'a جمع): It usually means that the time of one of both prayers enters and one prays either the actual prayer: Maghrib (three raka'a) and after taslim one prays 'Isha' (two raka'as) even if the time of 'Isha' has not entered yet. The usual way is to pray Maghrib a bit late lets say for example 30 min. before the 'adhan of 'Isha' this is called Jam' taqdeem جمع تقديم (joining by advancing).
Or we don't pray Maghrib on time and wait until the time of 'Isha' enters and then pray Maghrib first and 'Isha' later this is called Jama' ta'akheer جمع تأخير (joining by delaying).
As said before in the hanafi madhhab joining is not allowed, what actually is allowed there is to pray Maghrib right before the Adhan time for 'isha' and pray 'isha afterwards when the call for prayer was performed.
Again when it comes to details the madhhabs may have their own views on this: For example some madhhabs say for jama' taqdeem instead of iqamah for the second prayer (the prayer which will be performed before its actual time) one must perform adhan.
Finally back to the niyyah if you insisted on uttering the niyyah you may need to specify in case of joining what kind of joining you are planning for example by saying I'll pray prayer x and y jama'an wa qasran (by qasr and joining) or pray prayer x qasran jama' taqdeem/ta'akheer ... taqdeem or ta'akeer in first place refers to prayer that was not prayed on time.