At first glance, this problem might look pretty difficult to solve, but it is actually a very easy problem. All you have to notice here is that during the process of collision, all the forces that are involved are internal, that is, they are bi-tease systems of old particles. There is no external force and hence momentum will be conserved. And hence, all you have to do in this problem is use conservation of momentum. So, using conservation of momentum, we will get where v prime of t is the velocity of the second mass after the collision happens or during the collision. And now, we are all done. All you have to do is substitute the value of v of t in this equation and then solve for v prime of t. And once you do that, you will get v prime of t like this.