The piecewise function is $$f(x)= \begin{cases} 2, & x \leq -1\\ ax+b, & -1 < x < 3\\ -2, & x\geq 3 \end{cases} $$
So I first find the limit of the first piece which is $$\lim_{x\to -1}f(x)=2 $$
Then I find the limit of the 2nd piece at -1 from the right $$\lim_{x\to-1+}f(x)=-a+b $$
Then I repeat this for the 2nd and 3rd piece at 3
$$\lim_{x\to 3}f(x)=-2$$
$$\lim_{x\to 3-}f(x)=3a+b$$
Now I set the limits that approached the same number equal to each other
$$
\begin{split}
2 &= -a &+ b\\
-2 &= 3a &+b
\end{split}
$$
but this is where I get stuck because my prof. said to added them normally but when I do this I get
$$ 0=2a+2b$$
your last equation implies $a+b=0 \iff a = -b$ and the first one says $2 = b-a = b-(-b) = 2b \iff b = 1, a = -1$.