(a) The ball's height y at time t is given by
y = (20 m/s) sin(40º) t - 1/2 g t ²
where g = 9.80 m/s² is the magnitude of the acceleration due to gravity. Solve y = 0 for t :
0 = (20 m/s) sin(40º) t - 1/2 g t ²
0 = t ((20 m/s) sin(40º) - 1/2 g t )
t = 0 or (20 m/s) sin(40º) - 1/2 g t = 0
The first time refers to where the ball is initially launched, so we omit that solution.
(20 m/s) sin(40º) = 1/2 g t
t = (40 m/s) sin(40º) / g
t ≈ 2.6 s
(b) At its maximum height, the ball has zero vertical velocity. In the vertical direction, the ball is in free fall and only subject to the downward acceleration g. So
0² - ((20 m/s) sin(40º))² = 2 (-g) y
where y in this equation refers to the maximum height of the ball. Solve for y :
y = ((20 m/s) sin(40º))² / (2g)
y ≈ 8.4 m