During the impact a large tension develops. The impulse of tension `T_(1)` is equal to the change of momentum of `m_(1)` which is given as
`m_(1)v_(0)-J=m_(1)v`
Similarly the impulse of tension `T_(2)` is equal to the change in momentum of `m_(2)` which is given as
`J=m_(2)v`......ii
from eqn i and ii we have
`m_(1)(v_(0)-v)=m_(2)v`
This gives `v=(m_(1)v_(0))/(m_(1)+m_(2))`