I was given a task to solve this equation for $x$:
$$\frac{x-1}{x+1}=z\frac{1+i}{1-i}$$
for a complex number $z$ such that $z^2+z+1=0$. Solving this for $x$ is trivial but simplifying solution using the given condition is what's bothering me. Thanks ;)
You said that solving for $x$ was trivial, so I imagine you were able to get to:
$$x=\frac{1+zi}{1-zi}$$
This is equal to:
$$x=\frac{\left(1+zi\right)^2}{(1-zi)(1+zi)}=\frac{1+2zi-z^2}{1+z^2}$$
Since $1+z+z^2=0$ we can conlude that $1+z^2=-z$ and also that $1=-z-z^2$. We substitute that into the expression to get:
$$x=\frac{(-z-z^2)+2zi-z^2}{-z}=\frac{-z-2z^2+2zi}{-z}=1+2z-2i$$ $$x=1+2z-2i$$