Answer
$a=-\displaystyle \frac{3}{2},\quad b=-\frac{3}{2}$
Work Step by Step
The piecewise defined functions (polynomials) are continuous on their intervals.
For f to be continuous at $x=0$ and at $x=2$, the one sided limits at these values of x should be equal.
At $x=0,$
$\displaystyle \lim_{x\rightarrow 0^{-}} f(x)=\displaystyle \lim_{x\rightarrow 0^{-}}(ax+2b)=2b$
$\displaystyle \lim_{x\rightarrow 0^{+}} f(x)=\displaystyle \lim_{x\rightarrow 0^{+}}(x^{2}+3a-b)=3a-b$
For the limit to exist, we must have $2b=3a-b$
or, $3a-3b=0$
or, $\fbox{$a=b$}$
At $x=2,$
$\displaystyle \lim_{x\rightarrow 2^{-}} f(x)=\displaystyle \lim_{x\rightarrow 2^{-}}(x^{2}+3a-b)=3a-b+4$
$\displaystyle \lim_{x\rightarrow 2^{+}} f(x)=\displaystyle \lim_{x\rightarrow 2^{+}}(3x-5)=1$
For the limit to exist, we must have
$3a-b+4=1$
$\fbox{$3a-b=-3$}$
Combining the two equations we obtained,
$3a-a=-3 \ \ \displaystyle \Rightarrow \ \ 2a=-3 \ \ \Rightarrow \ \ a=-\frac{3}{2}$
Back-substituting,
$b=-\displaystyle \frac{3}{2}$