Answer
See the detailed answer below.
Work Step by Step
$$\color{blue}{\bf [a]}$$
For the Balmer series, we need to use the Balmer formula for the hydrogen atom,
$$\lambda=\dfrac{91.18\;\rm nm}{\dfrac{1}{m^2}-\dfrac{1}{n^2}}$$
where $m=1,2,3,...$, and $n=m+1,m+2,m+3,...$
As shown in Figure 37.7, the wavelengths in the hydrogen atom emission spectrum are 656.5 nm, 486.3 nm, 434.2 nm, and 410.3 nm.
Recalling that Balmer himself suggested only the original formula at which $m=2$.
For the first wavelength,
$$ \dfrac{1}{m^2}-\dfrac{1}{n^2}=\dfrac{91.18\;\rm nm}{\lambda_1}$$
$$ \dfrac{n^2-m^2}{m^2n^2}=\dfrac{91.18 }{656.5 }=0.1388 $$
This works for $m=\color{red}{\bf 2}$, and $n= \color{red}{\bf 3}$
For the second wavelength,
$$ \dfrac{1}{m^2}-\dfrac{1}{n^2}=\dfrac{91.18\;\rm nm}{\lambda_2}$$
$$ \dfrac{n^2-m^2}{m^2n^2}=\dfrac{91.18 }{486.3 }=0.1388 $$
This works for $m=\color{red}{\bf 2}$, and $n =\color{red}{\bf 4}$
For the third wavelength,
$$ \dfrac{1}{m^2}-\dfrac{1}{n^2}=\dfrac{91.18\;\rm nm}{\lambda_3}$$
$$ \dfrac{n^2-m^2}{m^2n^2}=\dfrac{91.18 }{434.2 }=0.2099$$
This works for $m=\color{red}{\bf 2}$, and $n =\color{red}{\bf 5}$
For the fourth wavelength,
$$ \dfrac{1}{m^2}-\dfrac{1}{n^2}=\dfrac{91.18\;\rm nm}{\lambda_4}$$
$$ \dfrac{n^2-m^2}{m^2n^2}=\dfrac{91.18 }{410.3 }=0.2222$$
This works for $m=\color{red}{\bf 2}$, and $n =\color{red}{\bf 6}$
$$\color{blue}{\bf [b]}$$
According to the results above, the fifth line will be at $m=\color{red}{\bf 2}$, and $n =\color{red}{\bf 7}$, so its wavelength is
$$\lambda_5=\dfrac{91.18\;\rm nm}{\dfrac{1}{m^2}-\dfrac{1}{n^2}}$$
$$\lambda_5=\dfrac{91.18\;\rm nm}{\dfrac{1}{2^2}-\dfrac{1}{7^2}}$$
$$\lambda_5=\color{red}{\bf 397.14}\;\rm nm$$