Let $u \in \mathbb{C}$ be a root of $x^3-x^2+x+2$. Consider $f = (u^2+u+1)(u^2-u)$ and $g= (u-1)^{-1}$ in $\mathbb{Q}(u)$ and express them in the form $au^2+bu+c$ with coefficients in $\mathbb{Q}$.
We have $f = (u^2+u+1)(u-1)u=(u^3-1)u=u^4-u = u^4 -u(u^3-u^2+u+2)-u=u^3-(u^3-u^2+u+2)-u^2-3u=-4u-2$.
While $g=-(u^2+1)/3$ (I found it solving $(u-1)(au^2+bu+c)$ for $a,b,c$).
Is this correct? Are there smarter ways to solve this exercise?
Here is a solution using Euclidean division.
For $f$, we get $$ f=(u^2+u+1)(u^2-u) = (u + 1)(u^3-u^2+u+2) + (-4 u - 2) = -4 u - 2 $$ For $g$, we get $$ 0 = u^3-u^2+u+2 = (u^2 + 1)(u-1) + 3 $$ and so the inverse of $u-1$ is $-(u^2 + 1)/3$.
Note that this works for $g$ only because $u-1$ has degree $1$ and so the remainder is a constant.