For real numbers $a$ and $b$ define
$$f(x) = \frac1{ax+b}$$
For which $a$ and $b$ are there three distinct real numbers $x_1$, $x_2$, $x_3$ such that $f(x_1) = x_2$, $f(x_2) = x_3$ and $f(x_3) = x_1$?
I tried to isolate a/b, and I found 3 values: f(x1) = x2 ---> 1/(a.x1 + b) = x2 ---> a.x1.x2 + b.x2 = 1 ---> I f(x2) = x3 ---> 1/(a.x2 + b) = x3 ---> a.x2.x3 + b.x3 = 1 ---> II f(x3) = x1 ---> 1/(a.x3 + b) = x1 ---> a.x1.x3 + b.x1 = 1 ---> III make I=II then, a/b = (x3 - x2)/x2.(x1 - x3) ---> x1 ≠ x3, for example, but i don't know how to proceed from here.
Assume $a\ne 0$. Then, $$x_1 = \frac1{ax_3+b}= \frac1{a\frac1{ax_2+b}+b}=\frac1{a\frac1{a\frac1{ax_1+b}+b}+b}$$
which leads to
$$(a+b^2)(ax_1^2+bx_1-1) = 0\tag 1$$
and similarly,
$$(a+b^2)(ax_2^2+bx_2-1) = 0,\>\>\>\>\>(a+b^2)(ax_3^2+bx_3-1) = 0\tag 2$$
If $a+b^2\ne 0$, then the solutions are
$$x_1 = x_2=x_3=\frac{-b\pm\sqrt{b^2+4a}}{2a}$$
and there are no real values of $a$ and $b$ that would make the three $x$'s distinct. On the other hand, if $a+b^2=0$, there are infinite number of solutions to (1) and (2) which can all be distinct. Thus, the values of $a$ and $b$ satisfy
$$a+b^2=0$$