#color(blue)(bar(ul(|color(white)(a/a)r = n^2a_0color(white)(a/a)|)))" "#
You use the Rydberg formula to calculate the energy.
Rydberg's original formula was expressed in terms of wavelengths, but we can rewrite the formula to have the units of energy.
The Rydberg formula in terms of energy is
#color(blue)(bar(ul(|color(white)(a/a) E = R(1/n_text(f)^2 - 1/n_text(i)^2)color(white)(a/a)|)))" "#
In this problem,