Step 1: Use the half-angle substitution.
Let $t=\tan\frac{x}{2}$, so $\sin x=\frac{2t}{1+t^2}$ and $dx=\frac{2\,dt}{1+t^2}$. The limits change: $x=0\Rightarrow t=0$, $x=\frac{\pi}{2}\Rightarrow t=1$.
Step 2: Simplify the integral.
After substituting, the integral becomes $\int_0^1\frac{2\,dt}{5t^2+8t+5}=\frac{2}{5}\int_0^1\frac{dt}{t^2+\frac{8}{5}t+1}$.
Step 3: Complete the square and integrate.
The bottom is $\left(t+\frac{4}{5}\right)^2+\left(\frac{3}{5}\right)^2$. Integrating gives $\frac{2}{3}\left[\tan^{-1}\frac{5t+4}{3}\right]_0^1$.
Step 4: Apply the limits.
This is $\frac{2}{3}\left[\tan^{-1}3-\tan^{-1}\frac{4}{3}\right]=\frac{2}{3}\tan^{-1}\frac{1}{3}$. So $A=\frac{2}{3}$, $B=\frac{1}{3}$, and $A+B=1$. \[ \boxed{A+B=1} \]