A comparative essay should be made up of equal parts of the texts or poems you are writing about, going into detail about each of the topics but also making comparisons and contrasts throughout. There are two ways to go about this: firstly to talk about each text/ poem in a separate paragraph, or secondly to structure it by theme and alternate paragraphs discussing each text/ poem in relation to the theme. These should be much shorter paragraphs than the first.
For example, if comparing and contrasting two poems, the two structures might be:
1. Intro - poem 1 - poem 2 - Conclusion
2. Intro - theme 1 in poem 1 - theme 1 in poem 2 - theme 2 in poem 1 - theme 2 in poem 2 - Conclusion
The second one perhaps shows more flair, as you are making comparisons and contrasts throughout whilst also going into detail, and it shows you have really thought about the themes and structure, but the first is definitely more simple to manage, especially during a time-pressured exam!
Best of luck!