Rather than memorize sines and cosines of various common triangles, I prefer to remember the simple derivation of those formulas…
Imagine that the wall is a mirror, so you have one ladder leaning against the wall and you also have the reflection of that ladder leaning behind it. Now the ladder is 6m long, its reflection is 6m long, and if the distance between their bases is also 6m then you have a 60–60–60 equilateral triangle. And, good news, the problem says that the base angle is 60 degrees. So the real part in front of the mirror is half of the equilateral triangle, which means the distance from the base to the mirror is 3m. And then the height is sqrt(36–9) = sqrt(27) = 3*sqrt(3).