The mass m1 is moving with speed u1 initially and mass m2 is at rest. After the collision, the mass m1 and m2 move with speed v in opposite directions.
Using the law of conservation of linear momentum, m1U1+m2U2=m1v1+m2v2 ⇒‌‌m1u1+m2(0)=m1(−v)+m2v ⇒‌‌m1u1=(−m1+m2)v...(i) Since, the collision is elastic because they move with same speed after the collision. Hence, coefficient of restitution, e=1 ∴‌‌e=‌
v2−v1
u1−u2
⇒1=‌
v−(−v)
u1−0
u1=2v...(ii) Putting the above value in Eq. (i), we get m7(2v)=(−m1+m2)v ⇒‌‌3m1=m2⇒‌