Here we have to choose the anion from the given atom, which will combine with Mg in a stable arrangement as a monovalent anion.
Mg²⁺ will only combine with one single anion O²⁻ to form MgO.
The electronic configuration of Magnesium (Mg¹²) is 1s²2s²2p⁶3s², so the most stable ionic form of Mg is Mg²⁺ having inert gas electronic configuration i.e. 10 (Neon).
Now for a single anion the charge of the ion should be -2. Among the given atoms the electronic configuration of oxygen (O⁸) is 1s²2s²2p⁴, so the divalent anion of oxygen posses 10 electrons, inert gas electronic configuration (Ne).
The electronic configuration of chlorine (Cl¹⁷) is 1s²2s²2p⁶3s²3p⁵. Thus the monovalent anion will have 18 electrons i.e. inert gas electronic configuration, Argon (Ar).
The helium has only 2 electrons and it cannot leave the electrons as it will be highly unstable in that condition.
The nitrogen (N⁷) 1s²2s²2p³, thus the divalent anion will poss 9 electrons which is not stable.
Thus Mg²⁺ will only combine with one single anion O²⁻ to form MgO, which will be highly stable.