Theo Viet: \(\left\{{}\begin{matrix}tana+tanb=p\\tana.tanb=q\end{matrix}\right.\)
\(\Rightarrow tan\left(a+b\right)=\frac{tana+tanb}{1-tana.tanb}=\frac{p}{1-q}\)
\(\Rightarrow A=cos^2\left(a+b\right)+psin\left(a+b\right)+q.sin^2\left(a+b\right)\)
\(=\frac{1}{cos^2\left(a+b\right)}\left(1+p.\frac{sin\left(a+b\right)}{cos\left(a+b\right)}+q.\frac{sin^2\left(a+b\right)}{cos^2\left(a+b\right)}\right)\)
\(=\left[1+tan^2\left(a+b\right)\right]\left[1+p.tan\left(a+b\right)+q.tan^2\left(a+b\right)\right]\)
\(=\left[1+\frac{p^2}{\left(1-q\right)^2}\right]\left[1+\frac{p^2}{1-q}+\frac{p^2q}{\left(1-q\right)^2}\right]\)
\(=\left[1+\frac{p^2}{\left(1-q\right)^2}\right]\left[1+\frac{p^2}{\left(1-q\right)^2}\right]=\left[1+\frac{p^2}{\left(1-q\right)^2}\right]^2\)