Prove if $n^2$ is even, then $n$ is even. I am just learning maths, and would like someone to verify my proof.

Suppose $n$ is an integer, and that $n^2$ is even.  If we add $n$ to $n^2$, we have $n^2 + n = n(n+1)$, and it follows that $n(n+1)$ is even.  Since $n^2$ is even, $n$ is even.

Is this valid?
It could use a little more explanation, but yes, it works. I’d expand it to point out explicitly why $n(n+1)$ is even and that $n=(n^2+n)-n^2$ is then the difference of two even numbers and as such is even (assuming that you already have this fact available to use).

An alternative approach is to show that if $n$ is odd, then $n^2$ is odd; the desired result is the contrapositive and therefore follows at once.
You have a true conclusion "if n$^2$ is even, then n is even" and thus you automatically have a valid argument, since every argument with a true conclusion is valid.

That said, it might come as interesting to look at something more general.  Let z indicate any positive natural number, and n any integer.  We'll prove that if n$^z$ is even, then n is even.

"If n$^z$ is even, then n is even" is logically equivalent to "if n is not even, then n$^z$ is not even."  All integers either are even (equal to a number of the form 2k) or odd (equal to a number of the form (2k+1)).  So, "if n is not even, then n$^z$ is not even." is logically equivalent to "if n is odd, then n$^z$" is odd."  It follows that, "If n$^z$ is even, then n is even" is logically equivalent to "if n is odd, then n$^z$" is odd."  Consequently, if we can prove that "if n is odd, then n$^z$" is odd.", it will follow that "if n$^z$ is even, then n is even."

If n is odd, then it can get written in the form (2k+1).  Since z is a positive natural number, we can use the binomial theorem on (2k+1)$^z$ to see if it's odd or even.  The last term of the expansion of (2k+1)$^z$ is 1$^z$ which equals 1.  So, is the sum of the other terms even?  The other terms of the sum go (2k)$^z$, (2k)$^z$$^-$$^1$a, ..., (2k)y.  Thus, for the sum of those terms, we can factor out 2 using the distributive property.  Consequently, the sum of those terms equals 2x where x is some integer, and thus that sum is even.  Since 1 is the last term, it follows that (2k+1)$^z$ equals (2x+1) where x is some integer.  But, that means that (2k+1)$^z$ is odd.  So, if n is odd, then n$^z$ is odd.

Since "if n is odd, then n$^z$ is odd." is logically equivalent to "if n$^z$ is even, then n is even." it logically follows that "if n$^z$ is even, then n is even" is true.

Since "if n$^z$ is even, then n is even" is true, by letting z=2, it follows that "if n$^2$ is even, then n is even." is true also.