I found this problem on an Instagram page which send mostly challenging problems.
$$\frac{f(x^2)}{f(x)}=1+x+x^2+\ldots+x^7\qquad\qquad f(x)=?$$
For $x=1$ we get $1=8$ which is a contraction hence $x=1$ should be excluded from domain of $f(x)$. Hence we have
$$\dfrac{f(x^2)}{f(x)}=\dfrac{x^8-1}{x-1}=(x+1)(x^2+1)(x^4+1)$$ But I don't know how to continue from here.
Simply use $$x^n+1=\frac{x^{2n}-1}{x^n-1}$$ for each factor of your decomposition $$(x+1)(x^2+1)(x^4+1).$$