Maclaurin expansion of $y=\frac{1+x+x^2}{1-x+x^2}$ to $x^4$ 
Maclaurin expansion of $$\displaystyle y=\frac{1+x+x^2}{1-x+x^2}\,\,\text{to } x^4$$

I have tried by using Maclaurin expansion of $\frac1{1-x}=1+x+x^2+\cdots +x^n+o(x^n)$, but it seems not lead me to anything.

Observe $$(x+1)(x^2 - x + 1) = x^3 + 1,$$ so that $$f(x) = \frac{x^2+x+1}{x^2-x+1} = 1 + \frac{2x}{x^2-x+1} = 1 + \frac{2x(x+1)}{x^3+1}.$$  Then consider the geometric series expansion $$\frac{1}{1 - (-x^3)} = 1 + (-x^3) + (-x^3)^2 + (-x^3)^3 + \cdots = 1 - x^3 + x^6 - x^9 + \cdots, \quad |x| < 1.$$  The result is now straightforward.
