Answer is 6 units 
Step by step. 
By using Pythagorean theory, a right triangle side lengths are a^2 + b ^2 = c ^2.
We know “c” the hypotenuse is 10 and “b” the leg is 8. We are looking for “a” or side length “x” 
Fill in the known values. 
a^2 + 8^2 = 10^2
a^2 + 64 = 100.
Subtract 64 from both sides to isolate “a” 
a^2 +64 -64 = 100 -64
a^2 = 36
Now take the square root of both sides to solve for “a”
a = 6