We are asked to find the total time #t# the ball was in the air. We are thus essentially solving for #t# in the equation #6=-16t^2+30t+5#.
To solve for #t# we rewrite the equation above by setting it equal to zero because 0 represents the height. Zero height implies the ball is on the ground. We can do this by subtracting #6# from both sides
#6cancel(color(red)(-6))=-16t^2+30t+5color(red)(-6)#
#0=-16t^2+30t-1#
To solve for #t# we must use the quadratic formula:
#x = (-b \pm sqrt(b^2-4ac)) / (2a) #
where #a=-16,b=30, c=-1#
So...
#t = (-(30)\pm sqrt((30)^2-4(-16)(-1))) / (2(-16)) #
#t = (-30 \pm sqrt(836))/ (-32) #
This yields #t~~0.034,t~~1.84#
Notice: What we ultimately found were the roots of the equation
and if we were to graph the function #y=-16t^2+30t-1# what we will get is the path of the ball.
https://www.desmos.com/calculator/vlriwas8gt
Notice in the graph (see link), the ball is shown to have touch the ground twice at the two #t# values we initially found but in the problem we throw the ball from an initial height of #5"ft"# so we can disregard #t~~0.034# because that value is implying that the ball was thrown at an initial height of zero which it wasn't
Thus, we are left with #t~~0.034# which is the other root which on the graph, represent the time for the ball to hit ground giving us the total time of flight (in seconds I presume).