Find the constants a & b such that the function f(x)={2 if ≤ -1

{ax+b if -1<x<3
{-2 if x ≥3
is continuous on the entire real line

the left-side transition point is (-1,2)

so (-1,2) should satisfy y = ax+b
2 = -a + b

the right-side transition point is (3, -2)
so (3,-2) should also satisfy y = ax + b
-2 = 3a + b
subtract those two equations
4a = -4
a = -1
then b = 2+a = 2-1 = 1

a=-1 , b=1