When you approach any kind of essay question in History IB, you should firstly consider what exactly an examiner wants you to do, what type of question it is and, therefore, how your essay should be structured. In this case, the question clearly asks you to make a comparison from which you should draw a conclusion. You should balance Stalin's and Trotsky's advantages and disadvantages. Having done it, you should point out what exactly, in your opinion, was the reason for Stalin's success and Trotsky's failure. This quick and easy analysis provides you with the body of your essay.
Because it is a comparison, the best way to do it is to prepare three body paragraphs. First one will be devoted to Stalin, second one - to Trotsky, the last one will be a direct comparison of advantages and disadvantages introduced in previous paragraphs. So, in the first paragrpah Stalin's background should be metioned (he was a bolshevik, so he was considered to be more trustworthy than Trotsky). Then, it should be mentioned that he had much control over the Party's structure (he had been General Secretary from 1922), which basically meant many people owed him their positions. His pragmatic political beliefs were more popular amongst Party memebrs. He supported "socialism in one country", which was applauded by the Party exhausted with the civil war.
In case of Trotsky, is should be mentioned that he was a menshevik, so he was not really trusted. Also, he did not hold any important office in the party (it weakened his position). He was the leader of the Red Army, but it evoked fear rather than support. Party members were afraid of bonapartism and Trotsky's possible military dictatorship. His foreign policy was not favoured. He supported international revolution, which basically meant the war with capitalist countries (much more powerful than the USSR). Last but not least, his character was a problem. He was arrogant and was considered to be "an intelectualist". Party members did not understand him and disliked him.
In the last paragraph you should balance Stalin's advantages and Trotsky's disadvantages. Then, in the conclusion, you should sum up everything once again and outline why exactly, according to your argument, Stalin succeeded and Trotsky did not. What was the key reason (or reasons) for it? It is a good place to quote other historians (if you know their opinions) and assess them.
It is also a good idea to write your introduction in the end. It may sound a bit strange, but you must provide your reader with a clear thesis statement in the introduction. Considering you have a really modest amount of time available in your exam, it is possible that you will not stick to your thesis if you have it written in advance. As a result, essay might be incoherent and that is the worst thing that can happen. It is a better idea to write the whole essay, go back to the beginning and write your introduction then.