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 = Vox*t + 1/2*a*t^2
since there is no horizontal acceleration, a = 0 m/s/s
delta x = Vox*t
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 = Voy*t + 1/2*g*t^2
since there is no initial vertical velocity, Voy = 0m/s
delta y = 1/2*g*t^2
delta y = 1/2*(-9.81 m/s/s)*(4/9 s)^2
solve for delta y and you will have the answer