This answer is an answer to the _original_ form of this question "show that if $20$ divides into $n^2$ evenly, then $20$ divides into $n$ evenly". The second half of this answer is automatically an answer to the _new_ form of this question "show that if $10$ divides into $n^2$ evenly, then $10$ divides into $n$ evenly".
It's not true - consider $n = 10$ - and the reason it fails is that $20$ is divisible by $p^k$ for some prime $p$ and some $k > 1$ (namely by $4 = 2^2$).
In general, if $m = p_1 \dots p_l$ is a product of _distinct_ primes, then $m|n^2 \implies m|n$. This follows, for instance, by looking at the prime number decomposition of $n$. Alternatively, look at a single prime factor $p_i$ of $m$. This divides $n^2$ and because it's prime it also divides $n$. Hence $m$ also divides $n$.