Solution (source code)

= Solution

Let $N_u,N_l$ be the upper- and lower-level populations and $g_u,g_l$ their <degeneracy factors>. At <thermal equilibrium>, the <Boltzmann distribution> gives
$$
\frac{N_u}{N_l}=\frac{g_u}{g_l}\exp\left(-\frac{\Delta E}{k_BT}\right),\qquad
\frac{\Delta E}{k_B}=\frac{27\times10^{-6}\,\mathrm{eV}}{8.617333262\times10^{-5}\,\mathrm{eV\,K^{-1}}}=0.313322\,\mathrm K.
$$
No <degeneracy factors> are supplied, so the numerical answers use equal <degeneracy factors>. Stating the ratio as upper population divided by lower population removes an otherwise arbitrary inversion.

\b[(a)] At $T=500\,\mathrm K$,
$$
\boxed{\frac{N_u}{N_l}=e^{-0.000626644}=0.999374.}
$$
The two populations are nearly equal because the level separation is much smaller than the thermal <energy> $k_BT$.

\b[(b)] At $T=2\,\mathrm{mK}=0.002\,\mathrm K$,
$$
\boxed{\frac{N_u}{N_l}=e^{-156.661}=9.18\times10^{-69}.}
$$
Almost every atom occupies the lower level. If the levels have unequal <degeneracy factors>, each boxed ratio must be multiplied by $g_u/g_l$; their individual values cannot be inferred from the paper.