<s>[INST] 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.
 [/INST] Hint: Expand the fraction with $(x+1)$
$$y=\frac{(1+x+x^2)(x+1)}{(x+1)(1-x+x^2)}=\frac{(1+x+x^2)(x+1)}{1+x^3}$$
Now use the geometric series you wrote down for $$\frac{1}{1-(-x^3)}$$
$$y=(1+x+x^2)(x+1)(1+(-x^3)+O(x^6))$$
</s>