Let us write equations of motion of the ball and the elevator:
, (elevator moves with constant speed upwards),
are initial heights of ball and elevator respectively,
are initial velocities of ball and elevator respectively.
a) When the ball and elevator contact, , from where , or, rearranging terms, .
This is a quadratic equation for time, when they contact. Solving the equation, obtain two roots . We discard the negative solution, hence the ball hits the elevator in at .
b) The velocity of the ball at time is (it is negative, because the ball is moving down). Velocity of the elevator remains , and is directed up, so relative velocity is .