Firstly, when writing an essay where you compare two or more texts, it is important that you remember to constantly refer to each text in relation to the other/s.
This may be shown via the structure of your essay as such:
-Introduction
(Here you may want to outline your line of argument- what is the main point you want to talk about? You may also then include the minor point- what will make up your paragraphs. For instance, if the essay focused on love, you might make a broad statement on love and outline the more specific ways in which the presentation of love is different in the two texts).
Each paragraph could then be a point about each text- with the idea of having maybe two paragraphs for one point of comparison.
Given the time constraints in an exam, it may be advisable to only write about two or three points of comparison, in detail.
Further to this, you may find it easier to talk about the broader way in which texts are similar, but then compare the two in more detail where they differ slightly. For instance, if two poems both present love as eternal, one may use a different poetic form to demonstrate this.
To conlude your essay, it is advisable to sum up your line of argument- the broad statement which focuses on the question and which you made in your introduction, referring briefly to the points you have made in your paragraph.