How do I compute the taylor series for $(1+x+x^2)^\frac{1}{x}$ I tried rewriting $(1+x+x^2)^\frac{1}{x}$ as $e^{\frac{1}{x}\ln(1+x+x^2)}$ and then computing the taylor series of $\frac{1}{x}$ and $\ln(1+x+x^2)$ but I'm still not getting the correct answer..

This appears to be the approach you used, but without seeing your work, it is hard to tell where you were having trouble.
Use the series $\log(1+x)=x-\frac{x^2}2+\frac{x^3}3+\cdots$
$$
\begin{align}
\frac1x\log\left(1+x+x^2\right)
&=\frac1x\left(x+x^2-\frac{x^2+2x^3+x^4}2+\frac{x^3+3x^4+3x^5+x^6}3+\cdots\right)\\
&=1+\frac12x-\frac23x^2+\cdots
\end{align}
$$
Then use the series $e^x=1+x+\frac{x^2}2+\cdots$
$$
\begin{align}
\left(1+x+x^2\right)^{1/x}
&=e^{1+\frac12x-\frac23x^2+\cdots}\\
&=e\left(1+\left(\frac12x-\frac23x^2+\cdots\right)+\frac12\left(\frac12x-\frac23x^2+\cdots\right)^2+\cdots\right)\\
&=e\left(1+\frac12x-\frac{13}{24}x^2+\cdots\right)
\end{align}
$$
