The element Na is 1s2 2s2 2p6 3s1. It takes x amount of energy to remove the 3s1 electron. That's answer A.
To remove the second electron (answer B) you must remove that electron not only against a +1 charge already on the Na^+ but it is digging into the completely closed shell of n = 2 since the outside shell of 1 electron is already gone. So B certainly is more than x of answer A.
For Mg, it is
1s2 2s2 2p6 3s2.
To remove one 3s electron requires slightly more energy than answer A because that outside electron of Mg must pull against 12+ in the nucleus while the outside electron of Na must pull against a nuclear charge of only 11+. Based on these three we know B is still the most energy required.
Now we look at removing the second 3s electron from Mg+. First it is pulling against a + charge just as in Na^+ removing the second electron; however, that second electron STILL is in the 3s outside shell, which is not closed as in the Na^+ removal of the second electron. So removing the second 3s electron from Mg^+ to make it Mg^2+ does require more energy than removing the first but not nearly as much as digging into a closed shell.
Just for the record, I looked up the ionization energies of these four. They are
Na ==> Na^+ + e 495.8 kJ/mol
Na^+ ==> Na^2+ + e 4562 kJ/mol
Mg ==> Mg^+ + e 737.7 kJ/mol
Mg^+ ==> Mg^2+ + e 1450.7
Thus the total energy to remove two electrons from Na is about 5000 kJ/mol with the removal of the second huge compared to the others.
The total energy to remove both from Mg is about 2200 kJ/mol
So I think I was right to pick answer B.