Assume all motion is in 1D ... Use conservation of momentum to write 2.5*3+0 = 5*m+v1*2.5 where v1 is the velocity of the first cart and m is the mass of the second. Since the collision is described as "elastic" it can be assumed that energy was conserved as well and that can be used to write .5*3*2.52+0 = .5*m*52+.5*2.5*v12 .
Solving the two equations yields m=1.30 kg and v1=0.41 m/s