you can use the formula of pythagoras theorem to know what of them is wrong
in the first case
-5^2 + 12^2 =169
13^2=169 ( it's a right equation so it can be lengths of right angle tri )
in the second case
_9^2 + 12^2 =225
17^2 not equal 225
so these are the lengths that can't be a right angle triangle