For the n=1 to n=3 transition the photon must supply the difference in energy between the two levels.
For the second case the final energy is just the kinetic energy as the electron is not part of the atom.
For the n=1 to n=3 transition the photon must supply the difference in energy between the two levels.
For the second case the final energy is just the kinetic energy as the electron is not part of the atom.