Answer:
a = -2; b = 4
Explanation:
I graphed your piecewise function in Figure 1.
The relation involving a and b is a parabola. It is the green segment in the middle of the graph. We must find values of a and b that make the parabola connect with the ends of the straight lines.
We could make the function continuous if the vertex were at (1, 2) and the x-intercept were at (2, 0).
The vertex form of the equation for a parabola is
y = a(x - h)² + k
where h and k are the coordinates of the vertex and a is a constant.
Data:
Vertex at (1, 2)
x-intercept at (2, 0)
Calculations:
1. Substitute the coordinates of the vertex into the equation
y = a(x - 1)² + 2
2. Substitute the coordinates of the x-intercept into the equation and solve for a

Thus, in the vertex form, a = -2, h = 1, k = 2
3. Determine the equation of the parabola in standard form
y = a(x - h)² + k = -2(x - 1)² + k = -2(x²- 2x + 1) + 2 = -2x² + 4x - 2 + 2
= -2x² + 4x
The values of a and b in the missing segment are -2 and + 4.
I graphed the missing parabola in Fig.2. It makes your piecewise function continuous.