The first I.P. of nitrogen is greater than oxygen while the reverse is true for their second I.P. values.why?

Q: The first I.P. of nitrogen is greater than oxygen while the reverse is true for their second I.P. values.why?

Solution: The first I.P corresponds to the removal of first electron. Since nitrogen is already half filled. So more energy is required to remove the electron. But once the electron is removed from oxygen it gains half filled stability and therefore the 2nd I.P. becomes high.