Prove or disprove : If $a\equiv b$ mod $m$, when $a,b,m\in \mathbb{Z}$ , then $a^3\equiv b^3$ mod $m^2$. Prove or disprove : If $a\equiv b$ mod $m$, when $a,b,m\in \mathbb{Z}$ , then 
$a^3\equiv b^3$ mod $m^2$
My attempt:
since  $a\equiv b$ mod $m$ then $a=b+mk$ for some $k$
Now $a^3=m^3k^3+b^3+3m^2k^2b+3mkb^2$
$a^3-b^3=m^3k^3+3m^2k^2b+3mkb^2$ 
from here I stuck 
 A: $$1\equiv 5\pmod 4$$
but $$5^3\equiv 13\not\equiv 1\pmod{16}.$$
A: For every $\color{Red}{m \notin \{ \pm 1, \pm 3 \}} $ , 
we will construct a 
$\color{Red}{\text{counter-example}}$! 
Remark(I): 
Let  $\color{Red}{m \neq \pm 3}$, 
and  $\color{Red}{m \neq \pm 1}$; 
in this case note that $m^2 \color{Red}{\nmid} 3m$. 

Let $a:=m+1$ and $b:=1$; 
then one can see easily that:
$$a^3-b^3=(m+1)^3-1^3=\color{Blue}{m^3+3m^2}+\color{Red}{3m}.$$

Notice that the above $a$ and $b$ are 
$\color{Red}{\text{counter-example}}$. 
[ 
Suppose on contrary that $a^3-b^3$ is divisible by $m^2$; 
on the otherhadn note that 
$\color{Blue}{\text{the first two terms}}$ are divisible by $m^2$, 
so $\color{Red}{\text{the third term}}$ must divisible by $m^2$, 
which has an obvious contradiction with remark(I). 
] 




Note that your assertion is $\color{Green}{\text{true}}$ when 
$\color{Green}{m \in \{ \pm 1, \pm 3 \}} $. 
Remark: 
Let $m \in \{ \pm 1, \pm 3 \} $; 
in this case 
for every $b,k \in \mathbb{Z}$ 
we have: 
$m^2 \color{Green}{\mid} 3mkb^2.$ 

Notice that $a \overset{m}{\equiv} b$ 
implies that there is an integer $k$, 
such that $a=b+mk$, 
as you noted, therefor we have: 
$$a^3-b^3=\color{Blue}{m^3k^3}+\color{Blue}{3m^2k^2b}+\color{Green}{3mkb^2} ,$$ 
$\color{Blue}{\text{the the first two terms}}$ are divisible by $m^2$, 
and by the remark(II) 
$\color{Green}{\text{the third term}}$ 
is again divisible by $m^2$, 
so we are done! 
