As bodies stick together after the collision so the collision is inelastic , but we know that linear momentum remains conserved also in an inelastic collision,
Momentum before collision = Momentum after collision
mv1+0=(m+m)v where v1 is the velocity of first object and given that, a body is at rest before collision so its momentum is taken zero,
or v=v1/2
Now the kinetic energy of two body system
E=12(m+m)v2
or E=122mv2
or E=mv2
or E=m(v12)2
or v1=√4E/m=2√E/m