Answer
The function is continuous when $a=-1,$ and $b=1.$
Work Step by Step
$\lim\limits_{x\to-1^-}f(x)=2.$
$\lim\limits_{x\to-1^+}f(x)=a(-1^+)+b=b-a.$
$\lim\limits_{x\to3^-}f(x)=a(3^-)+b=3a+b.$
$\lim\limits_{x\to3^+}f(x)=-2.$
For the function to be continuous, both $\lim\limits_{x\to-1^-}f(x)=\lim\limits_{x\to-1^+}f(x)$ and $\lim\limits_{x\to3^-}f(x)=\lim\limits_{x\to3^+}f(x)\to$
$b-a=2\to b=a+2. $
$3a+b=-2.$
Solving the system of equations gives us
$3a+(a+2)=-2\to4a=-4\to a=-1$ and $b=(-1)+2=1.$