

Let the ball A have mass m and initial velocity u.
Then Ei = 1 x m x u2/2 = E
And momentum = p mu, its a constant.
The potential energy becomes maximum when the kinetic energy is minimum. So this can occur when the bodies moves with the same velocities.
Minimum kinetic energy =Ef = p2/2(m + nm) = m2u2/2m(1 + n)
Thus, maximum potential energy = Ef ‾ Ei = [1 x m x u2/2] – m2u2/2m(1 + n)
So, E [1- (1/{1+n})]
That is, nE/(n + 1).
Thus the maximum potential energy will be nE/(n + 1).
