The $n_{i} = 4$ to$ n_{f}$= 2 transition results in a spectral line of the Balmer series. The energy involved in this transition can be calculated using the following expression:
$E=2.18\times 10^{-18}[\frac{1}{n_{i}^{2}}-\frac{1}{n_{f}^{2}}]$
Substituting these values in the expression for E:
$E=2.18\times 10^{-18}[\frac{1}{4^{2}}-\frac{1}{2^{2}}]$
=$2.18\times 10^{-18}[\frac{1-4}{16}]$
$2.18\times 10^{-18}\times (-\frac{3}{16})$
$E=-(4.0875\times 10^{-19}J)$
Here, the -ve sign denotes the emitted energy.
Substituting these values in the expression for $\lambda$:
$\lambda =\frac{(6.626\times 10^{-34})(3\times 10^{8})}{(4.0875\times 10^{-19})}$=$4.8631\times 10^{-7}\, m$
$\lambda =486.31\times 10^{-9}\, m$=$486\, nm$