We have this system of equations
a(-4)^2 + b(-4) + c = -22
a(-1)^2 + b(-1) + c = 2
a(2)^2 + b(2) + c = -1 simplify these
16a -4b + c = -22
a - b + c = 2
4a + 2b + c = -1
Subtract the second and third equations from the first and we get that
15a - 3b = -24 ⇒ 5a -b = -8 ⇒ -10a + 2b = 16
12a -6b = -21 ⇒ 4a - 2b = -7 ⇒ 4a - 2b = -7
Add the last two equations and we have that
-6a = 9 divide both sides by -6
a =9/-6 = -3/2
And
5(-3/2) - b = -8
-15/2 - b = -16/2
-b = -16/2 + 15/2
-b = -1/2
b = 1/2
And
a - b + c = 2
(-3/2) - (1/2) + c = 2
-2 + c = 2
c = 4
So
f (x) = ax^2 + bx + c = (-3/2)x^2 + (1/2)x + 4