Concept:An antonym is a word with the opposite meaning.
Magnanimous means having a generous, forgiving, and noble spirit.
Explanation:Magnanimous describes someone who is big-hearted and not petty.
The word "petty" means small-minded, concerned with trivial matters, and unforgiving.
Thus, petty is the direct opposite of magnanimous.
Let us check the other options:
Noble (A) and Generous (D) are synonyms, not antonyms.
Forgiving (C) is also close in meaning to magnanimous.
Only Petty (B) gives the contrasting meaning.
Answer:B. Petty