Explanation:
The first ionisation potentials generally increases when we move from left to right in a period. But elements with stable configurations have higher ionization potentials than expected.
$\mid \begin{array}{lccccc}\text { IInd period } & \text { Be } & \text { B } & \text { C } & \mathrm{N} & \mathrm{O} \\ \text { Valence shell } & 2 \mathrm{~s}^2 & 2 \mathrm{~s}^2, 2 \mathrm{p}^1 & 2 \mathrm{~s}^2, 2 \mathrm{p}^2, & 2 \mathrm{~s}^2, 2 \mathrm{p}^3 & 2 \mathrm{~s}^2, 2 \mathrm{p}^4\end{array}$ configuration.
All the given options are of second period. Among them oxygen is expected to have highest ionization potential, but nitrogen $\left(2 \mathrm{~s}^2, 2 \mathrm{p}^3\right)$ has higher ionisation potential due to its more stable configuration as compared to oxygen $\left(2 \mathrm{~s}^2, 2 \mathrm{p}^4\right)$.