Proof that the sum of the cubes of any three consecutive positive integers is divisible by three.
Solution 1:
Your solution is fine, provided you intended to prove that the sum is divisible by $3$.
If you intended to prove divisibility by $9$, then you've got more work to do!
If you're familiar with working $\pmod 3$, note @Math Gems comment/answer/alternative. (Though to be honest, I would have proceeded as did you, totally overlooking the value of Math Gems approach.)
Solution 2:
Your solution is perfect.
If you are familiar with modular arithmetic, there are even much faster proofs, see the comments.
Or, instead of $x,x+1,x+2$, you could start out from $x-1,x,x+1$. But no more evidence is needed than yours.