Since the water stream forms an arc, this can be solved using the derived equation for projectile motions. In particular, we use the equation for the trajectory of a projectile:
y = xtanθ + gx/2v²cosθ
where
y = 20 m
θ = 60°
g = 9.81 m/s²
v = 25 m/s
Substituting the values:
20 = xtan60° + (9.81)x/2(25)²cos60°
Solving for x,
x = 11.44 m
Therefore, the firefighter must be 11.44 m away from the base of the building.