Use the Pythagorean theorem:
[tex]a^2+8^2=10^2\\\\a^2+64=100\ \ \ \ |-64\\\\a^2=36\to a=\sqrt{36}\to a=6\ cm[/tex]