We don't know whether those two sides are both legs
of the right triangle, or if BC is the hypotenuse.
If AC and BC are both legs, then
AB = √ (AC² + BC²)
= √ (7² + 8²)
= √ (49 + 64) = √ 113 .
If BC is the hypotenuse of the right triangle, then
AB = √ (BC² - AC²)
= √ (8² - 7²)
= √ (64 - 49) = √ 15 .