the quadratic function that is created with roots -3 and 1 is:
f(x) = a(x + 3)(x - 1) = a(x^2 + 2x - 3) = a(x^2 + 2x) - 3a . . . . . . . . (1)
the quadratic function that is created with vertex at (-1, -8) is:
a(x + 1)^2 - 8 = a(x^2 + 2x + 1) - 8 = a(x^2 + 2x) + a - 8 . . . . . . . . (2)
From (1) and (2): a - 8 = -3a
4a = 8
a = 2
Therefore, required function is f(x) = 2(x^2 + 2x) - 3(2) = 2x^2 + 4x - 6