# How do you know if electron is deexciting or exciting itself?

I got a question which goes like this:

According to Bohr's theory, the electronic energy of H-atom in the n th Bohr's orbit is given by $$E_n=\frac{-21.7*10^{-12}}{n^2}J$$ Calculate the longest wavelength of electron from the third Bohr's orbit of the He+ ion.

For longest wavelength transition, we need lowest energy transition. Therefore the electron can de-excite to $n=2$ or excite to $n=4$. I do not need the answer to the question, but I need to know how to know if the electron is exciting or de-exciting.

From what I know, I think it would be exciting to $n=4$ since the energy is lesser than de-excitation energy.