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]$
 A: $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.
A: Examining your textbook shows that this exercise is not meant to be proved by induction. Rather, this and the next exercise are motivation (cases $\,k=2,3)\,$ to help you  discover the inductive step of a proof by induction on $\,k,\,$ that $\,a\equiv b\,\Rightarrow\, a^k\equiv b^k\,$ (= Congruence Power Rule below)
Hint $\ $ To prove cases $\,k=2,3,\,$  use the prior Exercise 1.14 (= Congruence Product Rule below)

Congruence Sum Rule $\rm\qquad\quad  A\equiv a,\quad B\equiv b\ \Rightarrow\ \color{#c0f}{A+B\,\equiv\, a+b}\ \ \ (mod\ m)$
Proof $\rm\ \ m\: |\: A\!-\!a,\ B\!-\!b\ \Rightarrow\ m\ |\ (A\!-\!a) + (B\!-\!b)\ =\ \color{#c0f}{A+B - (a+b)} $
Congruence Product Rule $\rm\quad\ A\equiv a,\ \ and \ \  B\equiv b\ \Rightarrow\ \color{blue}{AB\equiv ab}\ \ \ (mod\ m)$
Proof $\rm\ \ m\: |\: A\!-\!a,\ B\!-\!b\ \Rightarrow\ m\ |\ (A\!-\!a)\ B + a\ (B\!-\!b)\ =\ \color{blue}{AB - ab} $
Congruence Power Rule $\rm\qquad \color{}{A\equiv a}\ \Rightarrow\ \color{#c00}{A^n\equiv a^n}\ \  (mod\ m)$
Proof $\ $ It is true for $\rm\,n=1\,$ and $\rm\,A\equiv a,\ A^n\equiv a^n \Rightarrow\, \color{#c00}{A^{n+1}\equiv a^{n+1}},\,$ by the Product Rule, so the result follows by induction on $\,n.$
Polynomial Congruence Rule $\ $ If $\,f(x)\,$ is polynomial with integer coefficients then  $\ A\equiv a\ \Rightarrow\ f(A)\equiv f(a)\,\pmod m.$
Proof $\ $ By induction on $\, n = $ degree $f.\,$ Clear if $\, n = 0.\,$ Else $\,f(x) = f(0) + x\,g(x)\,$ for $\,g(x)\,$ a polynomial with integer coefficients of degree $< n.\,$  By induction $\,g(A)\equiv g(a)\,$ so $\, \color{#0a0}{A g(A)\equiv a g(a)}\,$ by the Product Rule. Hence $\,f(A) = f(0)+\color{#0a0}{Ag(A)}\equiv f(0)+\color{#0a0}{ag(a)} = f(a)\,$ by the Sum Rule. 
Beware $ $ that such rules need not hold true for other operations, e.g.
the exponential analog of above $\rm A^B\equiv\, a^b$ is not generally true (unless $\rm B = b,\,$ so it follows by applying the Polynomial Rule with $\,f(x) = x^{\rm b}).$ 
