Given: The president relied on his friends in other countries to help him win the war against their common enemy
Based on the context of the given sentence, allies would be the best replacement for friends
Answer: Option B
Explanation:
Allies are the head of a state/country who share mutual interests with another head of a state/country and co-operate to accomplish some purposes, which are usually military objectives.
Allies need not necessarily be friends but can also be people who share mutual interests, whereas buddies and mates refer to friends in an informal manner. Associates usually refer to colleagues at work, thus making allies as the suitable answer.