Ok, first we need to have in mind that to findthe distance we need to find also the time then we use the kinematic equations in the x-direction
delta x = Voxt + 1/2at^2
since there is no horizontal acceleration, a = 0 m/s/s
delta x = Voxt
40.0 m = 90 m/s t
t = 4/9 s
Now using this time you can calculate the vertical displacement due to gravity.
delta y = Voyt + 1/2gt^2
since there is no initial vertical velocity, Voy = 0m/s
delta y = 1/2gt^2
delta y = 1/2(-9.81 m/s/s)(4/9 s)^2
solve for delta y and you will have the answer