A projectile is shot at an angle of 40.0 degrees with a velocity of 25.0 m/s. If a building is 50.0 m away, will this projectile strike the building, and if so, at what height?

The time to reach the building, if it does not hit the ground first, is

L/(Vo*cos40) = 50/(25 cos40) = 2.61 seconds

The time to hit the ground, if it does not hit the building first, is
2 Vo sin40/g = 3.28 s

Therefore it hits the building (assuming it is tall enough so that the projectile can't go over the top).

To find out where it hits, use the
y vs t equation:
y = Vo*sin40*t - (g/2)t^2
and use t = 2.61 s