The Rydberg equation describes the wavelengths of light absorbed or emitted by hydrogen (and ONLY hydrogen) and is: 1/λ = R(1/n₁² - 1/n₂²). Where λ is the wavelength of light, R is the rydberg constant that is equal to 1.097*10⁷ m⁻¹ and n₁ is the initial energy level and n₂ is the final energy level. Thus we solve it for n₂, so we get n₂ = (sqrt(1/n₁² - 1/(λR)))⁻¹, plugging in the numbers, we get n₂ = (sqrt(1/(1)² - 1/((1.03*10⁻⁷)(1.097*10⁷)))⁻¹ = 2.9999..., which is close enough to 3.