Considering the cubic map $x_{n+1}=f(x_n)$ where $$f(x_n)=rx_n-x_n^3$$
I am trying to find the $2$-cycles of the map. Suppose that $f(p)=q$ and $f(q)=p$
My textbook gives the answer but I am wondering about the first step about how this $f(p)=q$ and $f(q)=p$ is being applied.
So I know that $p \ne q $
and we let $$f(x)=rx-x^3$$
To find fix points we let $f(x)=x$, so
$$x=rx-x^3$$
Here is the part I do not understand and am looking for some clarification on,
$$1) f(p)=q, f(q)=p$$
$$2) x=r(rx-x^3)-(rx-x^3)^3$$
So how did they go from $1)$ to $2)$?
$2)$ follows from $1)$, since if $f(p)=q$ and $f(q)=p$, then when we let $f(x)=rx-x^3$, we also let $f(rx-x^3)=x$. So in equation $f(x_n)=rx_n-x_n^3$, write $rx-x^3$ instead of $x_n$ and you get $f(x)=r(rx-x^3)-(rx-x^3)^3=x$.