I've answered an exercise on Stewart's Essential Calculus, he asks me to sketch a graph of an example of a function $f$ that satisfies all of the given conditions below:
$\lim_{x\rightarrow 3^+}f(x)=4$
$\lim_{x\rightarrow 3^-}f(x)=2$
$\lim_{x\rightarrow -2}f(x)=2$
$f(3)=3$
$f(-2)=1$
The plot below is the right answer. In my answer, the line that is passing through $a$ is passing through point $b$. Is my answer acceptable? I can't feel the guarantee that the line is really passing through point $a$ and I'm thinking that both answers are right.

Yes, basically right.
The slopes and convexity of the function may vary, but the main thing is that the graph of $f$ (what you called 'line') indeed wants to pass through $A$ (in a neighborhood of $x=-2$), but instead, at least at $x=-2$, it is 'sporadicly' valuated according to $B$. Similarly well plotted for $C,D,E$.