The function $f : \mathbb{R} \to \mathbb{R}$ is continuous . Also $0\lt x_1 \lt x_2 \lt x_3 \lt x_4 \ $ and $f(x_1) = x_2 \ , \ f(x_2) = x_3 \ , \ f(x_3) = x_4 \ , \ f(x_4) = x_1 $ . Prove that there is a $m \in \mathbb{R}$ so that $f(f(m)) = m$ .
My Try : Let $g(x) = f(x) - x $ and it is continuous over $\mathbb{R} $ . Furthermore , we have $g(x_1) \ , \ g(x_2) \ , \ g(x_3) \gt 0 $ and $g(x_4) \lt 0$ . The result is $f(c) = c$ for some $c$ between $x_3$ and $x_4$ . Applying $f$ to both sides yields to $f(f(c)) = f(c) = c$ .
Is my solution correct ? Also write other solutions . Thanks in advance !