How to determine the work function and electron velocities from data on the photoelectric effect?
Consider the difference between the kinetic energy in case A and B:
$$K_A-K_B=(E_A-W)-(E_B-W)=E_A-E_B$$ where the work function cancels out because it is the same metal in each experiment. 
The right hand side of this is easy to evaluate using $hc/\lambda$, which gives $$E_A-E_B=hc\left(\frac{1}{\lambda_A}-\frac{1}{\lambda_B}\right)=(\pu{1.9878\times10^{-25}J\cdot m})\cdot(\pu{1.333\times10^6m^{-1}})=\pu{2.65\times10^{-19}J}$$

To solve for the left hand side, we simplify to a single variable by recognizing that $v_a=2v_b$ (as Wildcat said, the right hand side is positive and the only way the left hand side will be is if A has the larger velocity): $$K_A-K_B=\frac{m}{2}(v_A^2-v_B^2)=\frac{m}{2}(4v_B^2-v_B^2)=\frac{3}{2}mv_B^2$$
With an electron mass of $\pu{9.109\times10^{-31}kg}$, this gives $v_B=\pu{4.404\times10^5 \frac{m}{s}}$ and $v_A=\pu{8.809\times10^5 \frac{m}{s}}$. The work function can then be solved by evaluating either $K_A$ or $K_B$ and solving for the difference $E_x-K_x=W$ where $x$ is either A or B.