Recall that a right triangle has 2 legs and a hypotenuse. If the legs are a and b, and the hyp. is h, then a^2 + b^2 = h^2.
Here, a^2 + (8 ft)^2 = (10 ft)^2, so that a^2 = 100 ft^2 - 64 ft^2, or 36 ft^2.
Thus, the desired leg length is a = +√36 = 6 ft
Make the Pythagorean Theorem your friend. ;)