This problem can be solved based on the rule of energy conservation, as the energy of the photon covers both the energy needed to overcome the binding energy as well as the energy of ejection.
The rule can be written as follows:
energy of photon = binding energy + kinetic energy of ejectection
(hc) / lambda = E + 0.5 x m x v^2 where:
h is plank's constant = 6.63 x 10^-34 m^2 kg / s
c is the speed of light = 3 x 10^8 m/sec
lambda is the wavelength = 310 nm
E is the required binding energy
m is the mass of photon = 9.11 x 10^-31 kg
v is the velocity = 3.45 x 10^5 m/s
So, as you can see, all the parameters in the equation are given except for E. Substitute to get the required E as follows:
(6.63x10^-34x3x10^8)/(310x10^-9) = E + 0.5(9.11 x 10^-31)(3.45x10^5)^2
E = 6.41 x 10^-16 joule
To get the E in ev, just divide the value in joules by 1.6 x 10^-19
E = 4.009 ev