The Pythagorean Theorem applies to all right angle triangles. Therefore if you substitute the numbers, it should work out.
Pythagorean Theorem: a^2+b^2=c^2
Does 8^2+15^2=17^2?
8 squared plus 15 squared is 289. 17 squared is 289. Therefore #1 is a right triangle.
5^2+8^2=11^2
89 doesn’t equal 121 so #2 is not a right angle triangle