Solution 1:

By the maximum modulus principle, the maximum is on the unit circle $|z| = 1$. Since $f$ has zeroes at $1$ and $2$, we would expect the maximum to be "as far as possible" away from those, i.e. at $x = -1$. Indeed, we have $f(-1) = 6$, and by the triangle inequality $$|f(z)| = |z^2-3z+2| \leq |z|^2+3|z|+2 = 6$$ on the unit circle. So $x=-1$ gives a maximum, but we still have to show that there are no other maxima.

Identifying $\mathbb C$ with $\mathbb R^2$, writing $z = x+yi$, the function becomes $$f(x,y) = (x^2-y^2-3x+2) + (2xy-3y)i$$ and we want to maximize $$|f(x,y)|^2 = (x^2-y^2-3x+2)^2 + (2xy-3y)^2$$ subject to the condition $x^2+y^2 = 1$. We can express $|f(x,y)|^2$ in terms of $x$ only, using $y^2=1-x^2$: \begin{align*}|f(x,y)|^2 &= (2x^2-3x+1)^2 + (2x-3)^2(1-x^2)\\ &= 8x^2-18x+10. \end{align*} The only maximum of this in $[-1,1]$ is at $x = -1$ .