Proving rigorously that if $3\mid(a+b)$ then $3\mid(a^3+b^3)$ using divisibility definition Let $a,b\in \mathbb Z$. Prove rigorously using divisibility definition that if $3\mid(a+b)$ then $3\mid(a^3+b^3)$
After a bit of algebra I get that
$$3\overset{?}{\mid}(a+b)^3-3ab(a+b)$$
So now how do I justify that it's divisible by $3$? Can I show that both expressions are divisible by $3$ separately? Then what do I mention to justify the sum of divisors is divisible?

$$3\mid a+b\mid (a+b)((a+b)^2-3ab)=(a+b)^3-3ab(a+b)=a^3+b^3$$
or
$$3\mid a+b\mid (a+b)(a^2-ab+b^2)=a^3+b^3$$

This uses the fact that $a\mid b\mid c\implies a \mid c$, where $a\neq 0$. It can be proved by definition as follows:
$\begin{cases}a\mid b\implies b=am,m\in\mathbb Z\\b\mid c\implies c=bk,k\in\mathbb Z\end{cases}\implies \begin{cases}c=bk=a(mk)\\mk\in\mathbb Z\end{cases}\implies a\mid c.\ \ \ \square$
