Ball A having initial velocity u=5 m/s collides elastically with block B initially at rest as shown in the figure. If both balls have the same mass, and the height of the tower is h=20 m, find the horizontal distance d traveled by ball B before hitting the ground.