The energy of the photon is
You use the Rydberg formula to calculate the energy.
Rydberg's original formula did not look directly at energies, but we can rewrite the formula to have these units.
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,