how do I solve this problem?

Answer:
[tex]\large\boxed{AB=10}[/tex]
Step-by-step explanation:
[tex]\text{The Pythagorean theorem:}\\\\hypotenuse^2=leg^2+leg^2\\\\\text{We have}\\\\leg=6\\leg=8\\hypotenuse=AB\\\\\text{substitute:}\\\\AB^2=6^2+8^2\\\\AB^2=36+64\\\\AB^2=100\to AB=\sqrt{100}\\\\AB=10[/tex]