If $f(x)$ and $g(x)$ are polynomials such that $$f(f(x))=g(g(x)), \phantom af(f(f(x)))=g(g(g(x)))$$ prove or disprove $f(x)=g(x)$.
My try: So since $f(f(x))=g(g(x))$, we have $$g(g(g(x)))=f(f(f(x)))=g(g(f(x)))$$ which doesn't necessarily prove that $f(x)=g(x)$. It seems to be not enough information to prove it, but I don't know how to construct a counterexample. Thanks!
Suppose this weren't true. Then, we know that the set $\{f(f(x))\mid x\in\mathbb C\}$ must be finite since otherwise, the polynomials would agree upon infinitely many values and hence be equal, as for all $y=f(f(x))$ $$f(y)=f(f(f(x)))=g(g(g(x)))=g(f(f(x)))=g(y)$$
But, the only way that the set can be finite is if $f(f(x))$ is constant, which is only possible if $f$ is constant. This would imply that $f=g$, a contradiction.
So, $f=g$.