The coordinates of a particle of water "t" seconds after it leaves the end of the fire hose will be
.. (x, y) = (38.4*cos(47.5°)t, -4.9t^2 +38.4*sin(47.5°)t)
Solving for t, we have
.. t = x/(38.4*cos(47.5°)
For x = 25.7 meters, t is about 0.99065 seconds.
Then y will be
.. -4.9*(0.99065)^2 +38.4*sin(47.5°)*0.99065 = 23.238 . . . . meters
The water will hit the building about 23.24 meters above the height of the hose.