Let's first get a sketch that represents this situation.
Here,
L represents the laddder
B represents the building
F represents the floor(distance between the base of the ladder and the building).
We have the equation, use pythagoras theorem:
To find the distance between the base of the ladder and the building, rewrite the formula above for f.
Thus, we have: