The function y = x2 + ax + b is a quadratic polynomial and therefore has one turning point. The turning point of a quadratic graph is either the maximum or minimum point. The coefficient of x2 is equal to 1, which being positive implies that this quadratic has a minimum point.
In order to find the minimum point (assuming existence) of a quadratic polynomial we need to complete the square, to find an equation of the form y = (x + c)2 + d (thus determining c and d).
Since (x + c)2 ≥ 0 we have that y = (x + c)2 + d ≥ d and therefore the minimum y coordinate is d. This is achieved when (x + c)2 = 0 i.e. when x = -c and so we have that -c is the x coordinate of the minimum point of the polynomial.
With the problem at hand we are given the turning point (which we know is a minimum) so we have that the x coordinate of the minimum point is -3 and the y coordinate of the minimum point is -4.
Therefore we have that y = (x+3)2 - 4. Now we can expand this equation by multiplying out the bracket:
y = x2 +3x +3x + 9 - 4 = x2 + 6x + 5
Therefore a = 6 and b = 5.