Official solution
Refunctioning the given function.
\[\& f(x)={|c|c|}\frac{ax+{x}^{2}-\sin 2x}{x} \& ,x>0 \ \frac{-ax+{x}^{2}+\sin 2x}{x} \& ,xFor continuity:\]
\[\begin{gathered} LHL=RHL\Rightarrow a-2=-a+2\Rightarrow a=2 \\ b=f(0)=RHL=2-2=0 \\ a+b=2+0=2 \end{gathered}\]