There's been asked the maximum height the ball can achieve, you're calculating the time wherefore the h=0 and so when the ball reach the ground.

Use:

Now you're calculating after how much time the ball will reach his highest point and then you've just to enter this time in the equation.