When we contrast things, people, or ideas, we are displaying how different they are, their dissimilarities to each other. Words such as "unlike" and "differs" offer precisely that idea. "Unlike" can be used as a preposition or as an adjective. In both cases, it conveys the idea that something is not like (dissimilar, different, disparate) something else. The same goes for "differ". The verb to differ can mean that someone disagrees with someone else, that is, their opinions are different. It can also mean that two or more things are different, opposed, in conflict with each other. As a matter of fact, the verbs to contrast and to differ are synonyms.
I'm not 1000% confident in this answer but I believe it's B) to inform readers about the tactics Sparta and Rome used to hold cities and their effectiveness