Nothing really went wrong. The product of an odd number and an even number is always even, since there is a factor of two. The product of two even numbers is also even, for the same reason. Leaving you with only the case where a and b are both odd. The product of two odd numbers is always odd. You did prove that in that case a^2+b^2 is even. You can state it more concisely than you did by after showing ab is odd you can now say the product of odd numbers is odd therefore a^2 is odd and b^2 is odd, and the sum of two odd numbers is even.

Nothing really went wrong. The product of an odd number and an even number is always even, since there is a factor of two. The product of two even numbers is also even, for the same reason. Leaving you with only the case where a and b are both odd. The product of two odd numbers is always odd. You did prove that in that case a^2+b^2 is even. You can state it more concisely than you did by after showing ab is odd you can now say the product of odd numbers is odd therefore a^2 is odd and b^2 is odd, and the sum of two odd numbers is even.

That's right, the only reason for checking the three cases is to prove that you considered all cases. What if you only considered a and b are odd, thus ab is odd, thus a^2+b^2 is even.? Someone might say, but what if a is even and b is odd? It may seem silly in this case, but you can't do any assuming when it comes to proofs. (well, only intentional assuming).

Suppose you were considering a proof about when ab was even? And then you considered only when a and b are both even. And then you found a^2+b^2 was also even, and then you claimed that ab is even implies a^2+b^2 is even ? This is not true since a is even and b is odd gives ab is even but gives a^2+b^2 is odd. So this is why you must show that you have considered all cases.

I showed that case 2 for ab didn't end up odd, i.e. If P fails, then Q holds/does not hold

Correct. The main point is that we must find all cases for P to be true. You did this by looking at all three cases separately and seeing if P was true or false. Since the only case where P is true is a and b being odd...

That's right, the only reason for checking the three cases is to prove that you considered all cases. What if you only considered a and b are odd, thus ab is odd, thus a^2+b^2 is even.? Someone might say, but what if a is even and b is odd? It may seem silly in this case, but you can't do any assuming when it comes to proofs. (well, only intentional assuming).

Suppose you were considering a proof about when ab was even? And then you considered only when a and b are both even. And then you found a^2+b^2 was also even, and then you claimed that ab is even implies a^2+b^2 is even ? This is not true since a is even and b is odd gives ab is even but gives a^2+b^2 is odd. So this is why you must show that you have considered all cases.

If p, then q

p fails, q does not follow, so (if p fails, then q) fails then (if p, then q) fails and that is the key to Case 2 and 3.