Problem based on Collision

A ball of mass m moving horizontally at a speed v collides with the bob of a simple pendulum at rest. The mass of the bob is also m . If the collision is perfectly inelastic, what will be the height to which the two balls rise after the collision