(b) How long was the ball in flight?

Method 1: The upward and downward segments of the trajectory are mirror images of each other! We can just figure out how long it takes to reach the maximum height, and then double that to get the total time.

Method 2: simply plug x = 0 and xo=0 into: x - xo = vo t + ½ a t2

This gives 0 = vo t + ½ a t2

Cancelling a factor of t gives:  0 = vo + ½ a t,   or
t =
-2vo
a
=
-24
-9.8
= 2.45 s