The areas of the faces $ABD,ACD,BCD,BCA$ of a tetrahedron $ABCD$ are $S_1,S_2,Q_1,Q_2$, respectively. The angle between the faces $ABD$ and $ACD$ equals $\alpha$, and the angle between $BCD$ and $BCA$ is $\beta$. Prove that $$S_1^2+S_2^2-2S_1S_2\cos\alpha=Q_1^2+Q_2^2-2Q_1Q_2\cos\beta.$$