This value of "a" is exactly the y-coordinate of the vertex of the parabola
y = x%5E2+%2B+4x++-+31.
To find it, complete the square:
x%5E2+%2B+4x++-+31 = %28x%2B2%29%5E2+-+4+-+31 = %28x%2B2%29%5E2+-+35.
So, this value of "a" is a = -35.
Figure. Plot y = x%5E2+%2B+4x++-+31.