Let a polynomial be given by
$$P(x) = 3x^{12n+5}+x^{3}+1$$
What is the remainder of the division of $P(x)$ by $x^2+x+1$?
As suggested in comments, we start off with observing that
$$x^3-1\equiv 0\pmod{x^2+x+1}\tag{1}$$
$$x^2\equiv -(x+1)\pmod{x^2+x+1}\tag{2}$$
From which we can conclude that
$$\begin{align}P(x) = 3x^{12n+5}+x^3+1&\equiv 3x^3x^{12n+2} + 2\pmod{x^2+x+1} \\ &\equiv 3x^{12n+2}+2\pmod{x^2+x+1} \\ &\equiv 3x^2(x^{3})^4+2\pmod{x^2+x+1} \\ &\equiv 3x^2+2\pmod{x^2+x+1}\\ &\equiv -3(x+1)+2\pmod{x^2+x+1}\\&= -3x-1\pmod{x^2+x+1}\end{align}$$