If $\tan A$ and $\tan B$ are the roots of $x^2+px+q=0$, then prove that
$$\sin^2(A+B)+p \sin(A+B) \cos(A+B) + q \cos^2(A+B) = q$$
My Attempt:
Using the sum and product formulae we have,
$q=\tan A\tan B, $ $-p=\tan A+\tan B$
And,
$\tan (A+B)=\frac{\tan A+\tan B}{1-\tan A\tan B} \Rightarrow \tan (A+B)=\frac{-p}{1-q}$