<s>[INST] Let $a, b,n$ be integers with $n > 0$. Show by induction that if $a\equiv b\pmod n$, then $a^2\equiv b^2\pmod n$. I tried to do the implication part. Please, see what I need to do to fix it.
claim: $n|a – b → n|a^2 – b^2$.
claim: $nk = a – b$ for some $k \in \mathbb Z \to nk' = a^2 – b^2$ for some $k' \in Z$.
$(a + 1)^2 – (b +1)^2$
$= a^2 + 2a + 1 -(b^2 +2b + 1)$
$=  a^2 + 2a  -b^2 -2b$
$= a^2 – b^2 + 2(a – b)$
$= (a + b)(a – b) +  2(a – b)$
$= (a – b)[(a + b) + 2]$
$= nk[(a + b) + 2]$
$= n[(a + b) + 2k]$
 [/INST] $a \equiv b \pmod n$ is equivalent to saying that for some integer $x$ and $y$, $a-xn=b-yn$. Therefore, $a=b+xn-yn=b+n(x-y)$, so $a^2=(b+n(x-y))^2$. By our previous definition, $(b+n(x-y))^2-zn=b^2-wn$ for integer $z$ and $w$ is equivalent to the statement which we are trying to prove. A little algebra shows that this is equivalent to the statement $n(x-y)(2b+nx-ny)=-wn$. Dividing through by $n$, we see that this is equivalent to the statement that, if $b$ is an integer, several integers added and multiplied produces an integer, which is obviously true, so all of the equivalent results, including your goal, are true. Oops, you wanted induction. Hope this helps anyway.
</s>