Using conservation of energy we find the velocity of ball A just before impact when it has fallen a vertical distance 4h:
2mg(5h-h) = 1
2
.2m. uA2
so uA = Ö8gh. By conservation of momentum at the impact, taking the velocities of the balls before and after impact to be uA , vA and uB=0, vB:
2muA = 2mvA + mvB
and using the coefficient of restitution:
0.5uA = vB - vA
From these two equations: vB = uA = Ö8gh and vA = 0.5 uA.

The time t before B hits the ground is given by:
h = 1
2
gt2
so
t =   æ
 ú
Ö

2h
g
 
.
The horizontal distance traveled in this time is given by:
d = Ö8gh ×   æ
 ú
Ö

2h
g
 
= 4h.