The initial speed of a cannonball is 500 m/s. The acceleration of gravity is 9.8 m/s2. The cannon and target are at the same elevation. If the ball is to strike a target that is at a horizontal distance of 3.7 km from the cannon, what is the minimum time of flight for the ball? Answer in units of s

horizontal distance=500*cosTheta*timeflight

so timeflight= 3.7/(500*cosTheta)

But in the vertical,
hf=hi+Vi*sinTheta*time-1/2 g time^2

so put the first expression for time into the second equation...

0=0+500*sinTheta*3.7/(500cosTheta) - 1/2 g ((3.7/500)^2 /cos^2Theta

multiply both sides by cos^2 Theta

0= 3.7 sintheta*cosTheta -g/2 (3.7/500)^2

now, use your sin (2a)=2sina*cosa identity to put this into one angle (2theta) and solve for Theta, then go back and find the answers asked.