Explanation:
does this mean the minimum value is 20 ? or the point of minimum value is x = 20 ? since I don't know, what your teacher meant I did it both ways :
in any case, we get the point of minimum (or maximum) value via the zeros of the first derivative of the function :
f'(x) = 2x + b
so,
0 = 2x + b
2x = -b
x = -b/2
if 20 is the x-value of the minimum, then
0 = 40 + b
b = -40
but if 20 is the minimum value of f(x), then
20 = (-b/2)² + b×-b/2 + 120
0 = b²/4 - b²/2 + 100 = -b²/4 + 100
b²/4 = 100
b/2 = 10
b = 20
so, we either have
f(x) = x² + 20x + 120
or
f(x) = x² - 40x + 120
the target format is
f(x) = (x - h)² + k = x² - 2hx + h² + k
with (h, k) being the vertex point.
so, for x² + 20x + 120 we get
-2hx = 20x
-2h = 20
-h = 10
h = -10
h² + k = 120
100 + k = 120
k = 20
and for x² - 40x + 120 we get
-2hx = -40x
2h = 40
h = 20 (as expected, per x = 20)
h² + k = 120
400 + k = 120
k = -280