If i join jamaat salat at the second rakaat of Ishaa when the imam is in qunoot, and i have not yet prayed maghrib, can i join with niyat of jamat ishaa or maghrib ? If it is niyat of maghrib, then will it be my first rakaat of maghrib while its the imam’s second rakaat of ishaa? If so, if i don’t have enough time to complete recitation of surah fateha and Qul but i am able to go in ruku with imam, is this salaat valid? Finally, in this case if i dont have enough time to complete surah fateha and qul but the imam is in qunoot, am i supposed to raise my hands in qunoot even if its my first rakaat?

Always read Maghrib first. If you are joining in second rakat, you Wait until imam goes in Ruku then join. in this case your rakat counts first.