Answer
\[A=\frac{-3}{10}\;,\;B=\frac{-1}{10}\]
Work Step by Step
Given that $y=A \sin x+B\cos x$ satisfies the differential equation \[y''+y'-2y=\sin x\;\;\;...(1)\]
\[y=A \sin x+B\cos x\;\;\;...(2)\]
Differentiate with respect to $x$
\[y'=A\cos x-B\sin x\;\;\;...(3)\]
Again differentiate with respect to $x$
\[y''=-A\sin x-B\cos x\;\;\;...(4)\]
Using (2),(3) and (4) in (1)
\[(-B-3A)\sin x+(A-3B)\cos x=\sin x\]
Compare both sides,
\[-B-3A=1\Rightarrow B+3A=-1\;\;\;...(5)\]
\[A-3B=0\Rightarrow A=3B\;\;\;...(6)\]
Using (6) in (5)
\[10B=-1\Rightarrow B=\frac{-1}{10}\]
From (6)
\[A=\frac{-3}{10}\]
Hence \[A=\frac{-3}{10}\;,\;B=\frac{-1}{10}.\]