It’s a nice observation! And your perseverance is applaudable. The fact that you have worked your way through the proof and have posted the same here shows your natural inclination towards Maths. Keep it up!
Coming to your question, there’s one flaw in the second proof. Let’s take it step by step.
Assuming that 2 is rational, we can find r and s ([math]\neq[/math][math]0[/math]) such that 2 = r/s
This statement is true. The possibilities for r and s are “2 and 1”, “4 and 2”, “-10 and -5”, etc. So, here itself, you have proved that 2 is rational. But for argument’s sake, if you want to proceed, you make the next statement:
Dividing r and s by their common factor, we get 2 = a/b, where a and b are co-primes.
Okay. Accepted that 2 can be reduced from r/s to its lowest terms a/b such that a and b are co-primes (with a=2, and b=1). Moving ahead,
So, [math]2b = a[/math].
Squaring both sides, we get [math]4b^2 = a^2[/math].
Therefore, since 4 divides [math]a^2[/math], 4 divides [math]a[/math].
Now here’s where you get into trouble. No, that last statement is not true. Just because 4 divides a number [math]a^2[/math], it doesn’t mean that it would divide [math]a[/math] also. You can have many counter examples for this:
4 divides [math]2^2=4[/math], but 4 doesn’t divide 2.
4 divides [math]6^2=36[/math] but 4 doesn’t divide 6.
4 divides [math]10^2=100[/math], but 4 doesn’t divide 10.
So, the generic statement that you made (If 4 divides [math]a^2[/math], then 4 divides [math]a[/math]) is false.
But, on the other hand, in the first proof, the statement:
Therefore, since 2 divides [math]a^2[/math], 2 divides [math]a[/math].
is true (it takes some more effort to prove that statement). In general, for any prime number p, the following statement is true:
If [math]p[/math] divides [math]n^2[/math], then [math]p[/math] divides [math]n[/math].
This happens to be the case in the first proof, where you have p=2, a prime number.