A quadratic formula, when graphed, becomes a parabola. It will have two values from every value of x except for the vertex.
So, the problem becomes: find the vertex.
This can be done by graphing, by completing the square, or by using this formula: x = -b / (2a).
Because you have the function in the form: f(x) = ax² + bx + c ---> a = 1, b = 4, c = -31
---> x = -b / (2a) ---> x = -4 / (2·1) = -2
The x-value of the vertex occurs when x = -2, now: f(-2) = (-2)² + 4(-2) - 31 = -35
This value, -35, is the answer that you are looking for.