Fix the AI's math mistake and explain why

練習問題

Pythagorean theorem: in a right triangle, the hypotenuse is c=13 and one leg is a=5. What is the other leg b?