<s>[INST] $f(f(x))=a^3\left(x^2-(2+b)x+2b-\frac2a\right)\left(x^2-(2+b)x+2b-\frac ba\right)$, $a\ne0$ has exactly one real zeroes $5$. 
Let $f(x)=a(x-2)(x-b)$, where $a,b\in R$ and $a\ne0$. Also, $f(f(x))=a^3\left(x^2-(2+b)x+2b-\frac2a\right)\left(x^2-(2+b)x+2b-\frac ba\right)$, $a\ne0$ has exactly one real zeroes $5$. Find the minima and maxima of $f(x)$.

$f(f(x))$ is a quartic equation. So, it would have $4$ roots. Its real root should occur in pair because complex roots occur in pair. So, I failed to understand the meaning of 'exactly one real zero' in the question. Does that mean its real roots are equal and they are equal to $5$?
Since $f(x)$ has a zero at $2$, $f(f(2))=f(0)=2ab$. But even RHS of $f(f(x))$ is coming out to be $2ab$ at $x=2$.
Putting $x=5$ in $f(f(x))$ gives an equation in $a^2$ and $b^2$. Don't know what to do with it.
Also, $f(x)=a(x^2-(2+b)x+2b)$
$f'(x)=a(2x-2-b)=0\implies x=\frac{2+b}2$ is the minima or maxima.
How to proceed next? Do the critical points of $f(x)$ tell us anything about $f(f(x))$?
 [/INST] If $a > 0$, then there are two solutions to $a(x-2)(x-b) = 2$, and thus $f(f(x))$ has more than one zero. So we know $a < 0$.
Since $f(f(x))$ is a downward-opening quartic with only one zero, it takes on no positive values. Thus, the maximum of $f$ must be no larger than its smallest zero. Additionally, since $f(f(x))$ actually achieves the value $0$, that means that its maximum value is equal to its smaller zero. Since have $f(f(x_{max})) = 0$ and we want $f(f(5)) = 0$, we must have $x_{max} = 5$. It's not hard to see $x_{max} = 1 + b/2$, so we must have $b= 8$. Since that's larger than $2$, we must have $f(x_{max}) = 2$.
</s>