(N/A) The necessary centripetal force for an electron of mass $m$ and charge $e$ moving with speed $v_n$ in an orbit of radius $r_n$ around a nucleus of charge $Ze$ is provided by the electrostatic force of attraction:
$\frac{m v_n^2}{r_n} = \frac{1}{4 \pi \epsilon_0} \frac{(Ze)(e)}{r_n^2}$
Multiplying both sides by $\frac{r_n}{2}$,we get the kinetic energy $K$:
$K = \frac{1}{2} m v_n^2 = \frac{Ze^2}{8 \pi \epsilon_0 r_n} \quad \dots (1)$
The potential energy $U$ of the electron in the field of the nucleus is:
$U = -\frac{1}{4 \pi \epsilon_0} \frac{(Ze)(e)}{r_n} = -\frac{Ze^2}{4 \pi \epsilon_0 r_n} \quad \dots (2)$
The total energy $E_n$ is the sum of kinetic and potential energy:
$E_n = K + U = \frac{Ze^2}{8 \pi \epsilon_0 r_n} - \frac{Ze^2}{4 \pi \epsilon_0 r_n}$
$E_n = -\frac{Ze^2}{8 \pi \epsilon_0 r_n}$
Substituting the given expression for $r_n = \frac{n^2 h^2 \epsilon_0}{\pi m Z e^2}$ into the energy formula:
$E_n = -\frac{Ze^2}{8 \pi \epsilon_0} \left( \frac{\pi m Z e^2}{n^2 h^2 \epsilon_0} \right) = -\frac{m Z^2 e^4}{8 \epsilon_0^2 n^2 h^2}$