Answer
$a=-\frac{1}{2}, b=1$, see explanations.
Work Step by Step
a. For the function
$g(x)=\begin{cases} ax+b,\ x\leq-1\\ax^3+x+2b, x\gt-1 \end{cases}$
to be differentiable, we need $lim_{x\to-1^+}f(x)=f(-1)$ and $lim_{x\to-1^+}f'(x)=f'(-1)$.
Thus we have
$\begin{cases} -a+2b-1=-a+b\\3(-1)^2a+1=a \end{cases}$
or
$\begin{cases} b=1\\2a=-1 \end{cases}$.
Thus, we get $a=-\frac{1}{2}, b=1$
b. Graph the function
$g(x)=\begin{cases} -\frac{1}{2}x+1,\ x\leq-1\\-\frac{1}{2}x^3+x+2, x\gt-1 \end{cases}$
as shown in the figure. We can see that the line is connected to the parabola at $x=-1$ smoothly because the function is differentiable at all x including this point.