You need to find the maximum of f(x) and solve it for x.

Do you know how to find it?

Either you find the zeros of f(x): x1 and x2 and you calculate x(max) = (x1+x2)/2 or you find the derivative of f(x) [but I'm not sure if you have ever heard about the derivative yet]

Using "Completing the square" is another possible solution.