In the solution to a problem, it's stated that
We see that $x^3+1=(x+1)(x^2-x+1)$.
Why is this, and what method can I use for similar problems with different coefficients?
The full problem is
Find the remainder when $x^{81}+x^{48}+2x^{27}+x^6+3$ is divided by $x^3+1$.
For the full problem: let be $$y=x^3.$$ Your problem is equivalent to find the remainder of $$ P(y) = y^{27} + y^{16} + 2y^9 + y^2 + 3 $$ when it is divided by $$y+1.$$ By Remainder's Theorem, that remainder is given by $$P(-1)=2.$$