The amount of energy required to remove an electron from the outermost orbit of a gaseous atom is known as
ionisation potential. Elements having half-filled or completely filled orbitals are more stable than partially filled orbitals.
In a period from left to right ionisation potential decreases as the atomic number increases. The given elements $$(Be, B, C, N, O)$$ are present in \[\text{II}\] period as
\[\xrightarrow{_{\text{Ionisation}\,\,\text{potential}\,\,\text{increases}}^{Be\,\,\,\,\,\,B\,\,\,\,\,\,\,\,C\,\,\,\,N\,\,\,\,\,O}}\]
But in case of $$Be$$ and $$B, Be$$ has higher ionisation potential due to stable configuration.
$${}_4Be = 1{s^2},2{s^2}$$
$$2{s^2}$$

Stable configuration
$${}_5B = 1{s^2},2{s^2}2{p^1}$$
$$2{p^1}$$

Unstable configuration
In the same way in case of $$N$$ and $$O, N$$ has higher ionisation potential than $$O$$ due to stable configuration
$${}_7N = 1{s^2},2{s^2}2{p^3}$$
$$2{p^3}$$

Stable configuration (half-filled)
$${}_8O = 1{s^2},2{s^2}2{p^4}$$
$$2{p^4}$$

Unstable configuration
So, the correct order of increasing ionisation potential will be
$$B < Be < C < O < N$$