Initial conditions:
There is .588J of energy in this system that must remain constant at every step. We can use this number to find the conditions just before collision:
Just after collision: momentum and energy are conserved so we can use the numbers from above to find the velocities of the balls just after collision.
Now solve for
in equation (1) and plug it into (2) and solve for
.
Use the quadratic equation:
The negative velocity is correct because it clear that the ball will not rebound with a greater velocity than it started with in the the same direction.
Just after collision:
At max height all KE is PE = mgh