The best answer is:
Cl; it takes much more energy to pull an electron away from a valence shell that is nearly full.
Chlorine has a higher ionization energy than magnesium because chlorine has six valence electrons and is one electron short of a full octet, while magnesium has two valence electrons and is more willing to lose those electrons to achieve a stable electron configuration. Thus, it takes more energy to remove an electron from chlorine than from magnesium.