I am tying to disprove it but I feel my proof is lacking, please let me know what I can improve on from here, thanks!:
- If $a ≡ b$ mod $m$, then $m|a-b$ i.e. $a-b=km$, $k$ is an int.
- Square both sides we get: $(a-b)^2=k^2m^2\implies a^2-2ab+b^2=k^2m^2$
- Then $a^2+b^2=2ab+k^2m^2$
- This means that $m^2|a^2+b^2$ and not $m^2|a^2-b^2$ i.e. $a^2≡b^2$ mod $m^2$
- Therefore the statement If $a ≡ b$ mod $m$, then $a^2 ≡ b^2$ mod $m^2$, is false.
Rather than directly prove the statement false, we can use the relations to look for counterexamples.
Suppose there exist $a$, $b$, and $m$ such that $a \equiv b \pmod{m}$ and $a^2 \equiv b^2 \pmod{m^2}$. Then there exist integers $k$ and $\ell$ such that $a-b=km$ and $a^2-b^2 = \ell m^2$. Since $a^2-b^2 = (a-b)(a+b)$, we have $km(a+b) = \ell m^2$, which means $k(a+b) = \ell m$. So $a+b$ is a zero divisor modulo $m$. Since $a+b \equiv 2b \pmod{m}$, we see that $2b$ is a zero divisor modulo $m$.
To find a counterexample, look for $b$ and $m$ such that $2b$ and $m$ are relatively prime, and set $a=b+km$ for any nonzero integer $k$. For instance, choose $b=1$ and $m=3$, so $a=4$. Then $16 \not\equiv 1 \pmod{9}$, so we have a counterexample. Steven Creech's counterexample comes from the choice $b=3$ and $m=5$.