Let $S:=\mathbb{R}\setminus\{0,1\}$. Let $g:S\to S$ be defined by $$g(x):=\frac{1}{1-x}\text{ for all }x\in S\,.$$
Prove that $g\circ g\circ g$ is the identity function $\text{id}_S$ on $S$.
Thus, we have
$$f(x)+f\big(g(x)\big)=x\,,$$
$$f\big(g(x)\big)+f\big((g\circ g)(x)\big)=g(x)\,,$$
and
$$f\big((g\circ g)(x)\big)+f(x)=(g\circ g)(x)\,,$$
for all $x\in S$.
This shows that $$f(x)=\frac{1}{2}\,\Big(x+(g\circ g)(x)-g(x)\Big)\text{ for every }x\in S\,.$$ In other words, $$f(x)=\frac{x^3-x+1}{2x(x-1)}\text{ for all }x\in S\,.$$ In fact, if $h:S\to S$ is arbitrary, then the solution $f:S\to S$ to the functional equation $$f(x)+f\big(g(x)\big)=h(x)\text{ for all }x\in S$$ is $$f(x)=\frac{1}{2}\,\Big(h(x)+(h\circ g\circ g)(x)-(h\circ g)(x)\Big)\text{ for each }x\in S\,.$$ (See, for example, Determine all functions $f$ satisfying the functional relation $f(x)+f\left(\frac{1}{1-x}\right)=\frac{2(1-2x)}{x(1-x)}$.)