The context of this question comes from calculating the fidelity drop of quantum systems after applying rotational X and Z gates. The equation to solve is shown below, for which the angle $\alpha$ needs to be found. $$ B = m\cos^{2}(\alpha) + k\cos(\alpha)\sin(\alpha) + n\sin^{2}(\alpha) $$ In the equation $B$, $m$, $k$, and $n$ are known.
I would be happy to receive some help with this, thanks in advance!