If f(x) = a+bx, what are the real values of a and b such that f(f(f(1))) = 14 and f(f(f(0))) = -13.
We have $f(f(f(x))) = a + b(a+b(a+bx)) = a + ab + b^2(a+bx) = a + ab + ab^2 + b^3x$. Then
\begin{eqnarray*}
f(f(f(1))) = a+ab+ab^2+b^3 &=& 14 \\
f(f(f(0))) = a+ab+ab^2 &=& -13
\end{eqnarray*}
So $b^3 = 14+13 = 27$, that is, $b=3$. Substituting $b$ in the second equation gives $a+3a+9a = -13$, that is, $a = -1$.