Initial velocity of the ball, u = 49 m/s
Acceleration, a = – g = – 9.8 m/s2
Case I:
When the lift was stationary, the boy throws the ball.
Taking upward motion of the ball,
Final velocity, v of the ball becomes zero at the highest point.
From first equation of motion, time of ascent (t) is given as:

But, the time of ascent is equal to the time of descent.
Hence, the total time taken by the ball to return to the boy’s hand = 5 + 5 = 10 s.
Case II:
The lift was moving up with a uniform velocity of 5 m/s. In this case, the relative velocity of the ball with respect to the boy remains the same i.e., 49 m/s. Therefore, in this case also, the ball will return back to the boy’s hand after 10 s.