<s>[INST] Proof verification: If $a \equiv b (mod$ $n)$, then $a^3 \equiv b^3 (mod$ $n)$ Would someone be willing to verify the following proof?
Theorem: Suppose $a, b \in \mathbb{Z}; n \in \mathbb{N}$.  If $a \equiv b (mod$ $n)$, then $a^3 \equiv b^3 (mod$ $n)$. 
Proof:
$a \equiv b (mod$ $n) \rightarrow xn = a - b; x \in \mathbb{Z}$
$\rightarrow a = xn + b$
Then, $a^3 = (xn)^3 + 3b(xn)^2 + 3b^2(xn) + b^3$.
This gives us $a^3 - b^3 = (xn)^3 + 3b(xn)^2 + 3b^2(xn) = n(x^3n^2 + 3bx^2n + 3b^2x)$
$n | n(x^3n^2 + 3bx^2n + 3b^2x) \rightarrow n | (a^3 - b^3)$
Therefore $a^3 \equiv b^3 (mod$ $n)$.
 [/INST] Your proof is correct.
You could have stopped at $a^3=b^3+kn$, it doesn't matter whether $k$ has a complicated expression, if it's an integer, then $a^3\equiv b^3\pmod n$.
However, notice that you can factorize $xn$ actually, and that $xn=a-b$.
Thus $a^3-b^3\equiv(a-b)(a^2+ab+b^2)\equiv 0\pmod n$ since $(a-b)\equiv 0\pmod n$.
You are not forced to get back to definition everytime, try to use modular calculus directly as well, it is powerful.
</s>