Introduction with quotation or anecdotes that lay the ground for the thesis statement.
Next, Topic A is introduced in great detail. The exhaustive description can continue for quite a few paragraphs. All aspects of this topic that will be used later for comparison should be discussed in this section in great detail. Topic B should not be mentioned in this section at all.
The third section should have comprehensive details about Topic B. The same rules apply for this section as well. No mention of Topic A should be made here.
The next section is where you compare the two elements you have chosen to pit against each other and bring out the similarities and differences in them optimally.
Finally, a complete summarization and a good conclusion to reaffirm the thesis stated in the introduction.