If we were to draw a horizontal line from the bottom of the ladder to the bottom of the tree and then draw a vertical line from the bottom of the tree to the top of the ladder, we'd get a right triangle with legs as the distance between the bottom of the tree and the bottom of the ladder and the height of the ladder, and the hypotenuse is the length.
Here, we know the hypotenuse is 10 feet and that the bottom of the ladder is 4 feet away from the bottom of the tree, so use the Pythagorean Theorem to find the height: