Assume the initial velocity of each particle is =u And height of building =h If final velocity of A is vA then vA2=u2+2(−g)(−h)=u2+2gh If final velocity of B is vB then vB2=u2+2g h ∴VA=VB Sign Rule : Take the direction of initial velocity positive opposite direction as negative. Here for ball A initial velocity u is upward so upward is positive and downward is negative. That is why gravity is =−g and height =−h And for ball B initial velocity u is downward so downward is positive and upward is negative. That is why gravity is =+g and height =+h