Let the maximum energies of emitted electrons are $$K_1$$ and $$K_2$$ when $$600 \ nm$$ and $$400 \ nm$$ visible light are used according to question
$$K_2= 2K_1$$
$$K_{max}= h \nu - \phi = \dfrac{hc}{\lambda} - \phi$$
$$K_1 = \dfrac{hc}{\lambda_2}- \phi=2K_1$$
$$\dfrac{hc}{\lambda_2}- \phi = 2 \bigg[\dfrac{hc}{\lambda_1}- \phi \bigg] = \dfrac{2hc}{\lambda_1}- 2 \phi$$
$$\phi = hc \bigg[ \dfrac{2}{\lambda_1} - \dfrac{1}{\lambda_2} \bigg] \ \ (\therefore \ hc= 1240 \ ev \ nm)$$
Work function $$\phi= \dfrac{6.2}{6} = 1.03 \ eV$$.