1) 5 is the unique root of ff(x) ==> ff(5) is the min/max value of ff(x).
2) so [ff(5)]' = f'(f(5))* f'(5) = 0
3) suppose ( not guess, since there is another possible case) f'(f(5)) = 0
4) then f(x) get its min/max value 0 at x=f(5)
5) we know f(2) = 0, so f(5)=2 (and no further calcul is needed, since the solution will anyway be wrong )
6) if you continue the calcul, you can find easily (without stupid calcul ) f(x) = 2/9*(x-2)^2, f(0)=8/9
Now, take the another possibility f'(5) = 0, and you will get the right answer.