Take the ground as the origin and upward as positive, so a=−g for both balls.
(a) Ball Q: yQ=20−15t−5t2=0 gives t2+3t−4=0, (t+4)(t−1)=0, so tQ=1 s. Its velocity then is vQ=−15−10(1)=−25 m s−1.
Ball P: yP=20+15t−5t2=0 gives t2−3t−4=0, (t−4)(t+1)=0, so tP=4 s. Its velocity then is vP=15−10(4)=−25 m s−1.
P lands 3 s after Q, and both land at 25 m s−1 downward.
(b) The position equations are
yP=h+ut−21gt2,yQ=h−ut−21gt2
Let Q land at tQ, so h−utQ−21gtQ2=0. Put t=tQ+g2u into yP:
yP=h+utQ+g2u2−21g(tQ2+g4utQ+g24u2)=h−utQ−21gtQ2=0
So P is at the ground at tP=tQ+2u/g (here 1+3=4 s). Its landing velocity is
vP=u−g(tQ+g2u)=−u−gtQ=vQ
Both land with the same velocity. The extra 2u/g is exactly the time P spends rising to its top and falling back to the top of the tower, where it again moves downward at speed u, just like Q at the start.