(a) The work function is the energy of a photon at the threshold wavelength:
ϕ0=λ0hc=5401240=2.30 eV
The photon energy of the 400 nm light is
E=4001240=3.10 eV
Kmax=E−ϕ0=3.10−2.30=0.80 eV
Since eV0=Kmax, the stopping potential is V0=0.80 V.
(b) For V0≥0.50 V, the photon energy must be at least
Emin=ϕ0+eV0=2.30+0.50=2.80 eV
A longer wavelength means a smaller photon energy, so the longest wavelength that still works is
λmax=Eminhc=2.801240≈443 nm
Any wavelength shorter than about 443 nm gives a stopping potential of 0.50 V or more.