The following figure shows the vertical motion of the ball.
From the figure,
v−vA‌‌=−gt 0−vA‌‌=−10(1) vA‌‌=10m∕s since, Boy B observed the ball crossing him while up and down motion in 1s. So, the time taken by the ball to reach he floor B from floor A is 0.5 s. So s‌‌=vAt−‌