\(\dfrac{x^5+x^4+1}{x^2+x+1}\)
\(=\dfrac{\left(x^5+x^4+x^3\right)+\left(x^2+x+1\right)-\left(x^3+x^2+x\right)}{x^2+x+1}\)
\(=\dfrac{x^3\left(x^2+x+1\right)+\left(x^2+x+1\right)-x\left(x^2+x+1\right)}{x^2+x+1}\)
\(=\dfrac{\left(x^2+x+1\right)\left(x^3+1-x\right)\text{}}{x^2+x+1\text{}}\)
\(=x^3+1-x\text{}\)