And we consider the ELEMENT not the molecule, inasmuch as this is how ionization enthalpies are defined......
$"Atom(g)"+Deltararr"Atom(g)"^+ + e^(-)$
For $Be$ we gots $Z=4$, $1s^(2)2s^(2)$
For $B$ we gots $Z=5$, $1s^(2)2s^(2)2p^1$
The ionization of boron involves removal of a $"p-electron"$, which has NO electron at the nuclear core, and thus should be easier to remove than a $s$ electron, which can lie closer to the nuclear core.
For $N$ we gots $Z=7$, $1s^(2)2s^(2)2p^3$
For $O$ we gots $Z=8$, $1s^(2)2s^(2)2p^4$
For nitrogen, we have a half-filled $"p-shell"$ which is energetically stabilized with respect to $"Hund's rule"$ of maximum multiplicity. For the oxygen atom, even tho it has $Z=8$, the electronic configuration of the cation is SLIGHTLY stabilized by Hund's rule. None of this treatment is any substitute for reading the relevant section of your text.