Velocity of ball A in up direction = Va= u –gt
Where, u = initial velocity
g = acceleration due to gravity
t = time
Velocity of ball B in down direction = Vb = gt , (since initial velocity is zero)
Therefore, velocity of ball A with respect to ball B = u –gt – gt = u – 2gt
Therefore, velocity of ball A with respect to ball B = u – 2gt.