Just so you can see the Kinetic Energy would be the same for each (as well as work done, obviously)
F=F1=F2=m1*a1=m2*a2 (standard definition for some blocks on a flat surface)
a1=F/m1 (accel)
dv/dt = F/m1 (accel in differential)
dv/dx dx/dt = F/m1 (product rule)
v*(dv/dx) = F/m1 (velocity def)
Integral(v*dv) = Integral (F/m1 * dx) (v=0..v,x=0..x)
1/2 v^2 = (F/m1) * x
(1/2)*m1*v^2 = F*x == Kinetic Energy = Work Done given some distance X from a point at which V=0.
Same with F2=m2a2, youll get F*x
so the kinetic energies are the same. F*x (Fd).