If the ladder were flat (on the ground) you would be correct,

HOWEVER,

"The ladder makes an angle of 60 degrees with the ground."

Make a sketch (it does not have to be to scale, nor on paper, just create a mental image) of what you have & data given.

The ladder, wall, & ground represent the three sides of a triangle.

You know the length of the hypotenuse, that is the length of the ladder or 12 feet.

The length of the base is:

There are a few sin/cos values you should memorize.

sin(30) & cos(60) is one of them.

Subtract the distance the fence is from the building, from the base of the triangle, the distance the foot of the ladder is from the building.