Interestingly, I have looked up a comparison between the second ionisation energies of Li and He and it turns out Li has a higher second ionisation energy than He.
I hadn’t factored in things like exchange energy, which is something you don’t need to worry about unless you do undergrad chemistry.
As such, I will include a corrected explanation of the answer to the above question:
The first thing you should do is think in terms of which orbitals are involved.
He+ loses an electron from the innermost shell (1s orbital)
Li loses an electron from the 2s subshell
Mg+ loses an electron from the 3s subshell
N+ loses an electron from the 2p subshell
So it must be A, as this involves the removal of an electron from the shell nearest the nucleus. Furthermore, there is greater nuclear attraction to the electron removed as the ion has a net positive charge.