To add to Preem'sPrem's answer:
Whenever you have $f(f(...f(x)...)) = g(x)$ where $g$ ifis bijective, then $f$ must also be bijective, no matter how many times you involute $f$.
Surjective: Since $g$ is surjective (bijective), it takes on all values in $\mathbf{R}$, but we see that everything on the left side is "wrapped" in $f$, and hence $f$ also takes on every value in $\mathbf{R} \implies f$ is surjective.
Injective: Assume $f(a) = f(b)$. Then, $f(...f(a)...) = g(a) = f(...f(b)...) = g(b) \implies g(a) = g(b)$. But since $g$ is injective (bijective), $g(a) = g(b) \iff a = b$.