We can use Pythagoras's theorem expression:
Where h is the hypotenuse of the triangle and a and b are its legs, in this case, we have the value of the length of one leg and the value of the length of the hypotenuse, then we can solve for the other leg length like this:
Now let's replace the values from the figure, b is x, h is 10 and a is 6
Then, x equals 8