The bob A of a pendulum released

The bob A of a pendulum released from 30° to the vertical hits another bob B of the same mass at rest on a table as shown in figure.

How high does the bob A rise after the collision? Neglect the size of the bobs and assume the collision to be elastic.

When the pendulum bob A reaches the position B, its velocity is horizontal and it strikes the mass m placed at B. Since, the collision is one-dimensional and elastic, the bob exchange their velocities being of the same mass. The bob A does not rise at all and the bob B begins to move with the velocity of A.