Answer:
m = M (u-V)/(v-u)
Explanation:
We know that:

If we sum -mu to both sides of the equation we get:

Now let's sum -MV to both sides:

Now we can factor the m and M terms:

Finally we can divide by v-u ***

Since (v-u)/(v-u) =1
m = M (u-V)/(v-u)
***
If u=v it will imply that V=u and tehrefore the two mases will travel with the same velocity to the same direction and no collision would take place
***