Example 2 Given $\frac{\cos ^{4} A}{\cos ^{2} B}+\frac{\sin ^{4} A}{\sin ^{2} B}=1$, find the value of $\frac{\cos ^{4} B}{\cos ^{2} A}+\frac{\sin ^{4} B}{\sin ^{2} A}$.
By Cauchy-Schwarz inequality, we have
$$\begin{aligned}
& \frac{\cos ^{4} A}{\cos ^{2} B}+\frac{\sin ^{4} A}{\sin ^{2} B} \\
= & {\left[\left(\frac{\cos ^{2} A}{\cos B}\right)^{2}+\left(\frac{\sin ^{2} A}{\sin B}\right)^{2}\right]\left[\cos ^{2} B+\sin ^{2} B\right] } \\
\geqslant & {\left[\frac{\cos ^{2} A}{\cos B} \cdot \cos B+\frac{\sin ^{2} A}{\sin B} \cdot \sin B\right]^{2}=1, }
\end{aligned}$$

where the equality holds if and only if there exists a constant $k$, such that
$$\left\{\begin{array}{l}
\frac{\cos ^{2} A}{\cos B}=k \cos B \\
\frac{\sin ^{2} A}{\sin B}=k \sin B
\end{array}\right.$$

Thus, the original condition is equivalent to (2). From (2), it is easy to see that $k=1$, hence $\cos ^{2} A=\cos ^{2} B, \sin ^{2} A=\sin ^{2} B$, so $\frac{\cos ^{4} B}{\cos ^{2} A}+\frac{\sin ^{4} B}{\sin ^{2} A}$ $=\frac{\cos ^{4} B}{\cos ^{2} B}+\frac{\sin ^{4} B}{\sin ^{2} B}=1$