The ionization enthalpy of oxygen is lower than that of nitrogen because when one electron is removed from oxygen, it easily donates it to achieve half-filled stability, whereas removing one electron from nitrogen is difficult because it already has half-filled stability and would eventually become unstable. So, Nitrogen has a positive electron gain enthalpy whereas oxygen has negative.