Let $R(\theta)=
\begin{pmatrix}
\cos \theta & \sin \theta \\
-\sin \theta & \cos \theta
\end{pmatrix}$ such that $
\begin{pmatrix} x' \\ y' \end{pmatrix}=R(\theta)
\begin{pmatrix} x \\ y \end{pmatrix}$.
\begin{align*}
ax^2+bxy+cy^2 &=
\begin{pmatrix} x & y \end{pmatrix}
\begin{pmatrix}
a & \frac{b}{2} \\
\frac{b}{2} & c
\end{pmatrix}
\begin{pmatrix} x \\ y \end{pmatrix} \\
\begin{pmatrix}
a' & 0 \\
0 & b'
\end{pmatrix}
&=R(\theta)^T
\begin{pmatrix}
a & \frac{b}{2} \\
\frac{b}{2} & c
\end{pmatrix}
R(\theta) \\ &=
\begin{pmatrix}
\frac{a+c}{2}+\frac{a-c}{2}\cos 2\theta-\frac{b}{2} \sin 2\theta &
\frac{b}{2}\cos 2\theta+\frac{a-c}{2}\sin 2\theta \\
\frac{b}{2}\cos 2\theta+\frac{a-c}{2}\sin 2\theta &
\frac{a+c}{2}+\frac{c-a}{2}\cos 2\theta+\frac{b}{2} \sin 2\theta
\end{pmatrix} \\
\end{align*}
Now
\begin{align*}
\tan 2\theta &= \frac{b}{c-a} \\
a'+b' &= a+c \\
a'b' &=
\left( \frac{a+c}{2} \right)^2-
\left( \frac{c-a}{2}\cos 2\theta+\frac{b}{2}\sin 2\theta \right)^2 \\
&= \left( \frac{a+c}{2} \right)^2-
\left(
\frac{b}{2\tan 2\theta}\cos 2\theta+\frac{b}{2}\sin 2\theta
\right)^2 \\
&= \left( \frac{a+c}{2} \right)^2-
\frac{b^2}{4\sin^2 2\theta} \\
&= \left( \frac{a+c}{2} \right)^2-
\frac{b^2(1+\tan^2 2\theta)}{4\tan^2 2\theta} \\
&= \left( \frac{a+c}{2} \right)^2-
\frac{(c-a)^2+b^2}{4} \\
&= ac-\frac{b^2}{4}
\end{align*}
Note briefly
$a'$ and $b'$ are the eigenvalues of $
\begin{pmatrix}
a & \frac{b}{2} \\
\frac{b}{2} & c
\end{pmatrix}$, that is
$$\det
\begin{pmatrix}
a-m & \frac{b}{2} \\
\frac{b}{2} & c-m
\end{pmatrix}
=0$$