I am having some difficulty rearranging to get from the first line to the next.
Any help would be much appreciated!
$$s\sqrt{1-s^2}\,(A_{kk}-A_{ll})=(2s^2-1)\,A_{lk} $$
$$s^2=\frac12\left(1\pm\sqrt{\dfrac{(A_{kk}-A_{ll})^2}{(A_{kk}-A_{ll})^2+4A_{lk}^2}}\right) $$
Take the square of the original equation $$ s\sqrt{1-s^2}\left(A_{kk}-A_{ll}\right)=\left(2s^2-1\right)A_{lk}, $$ and we have $$ s^2\left(1-s^2\right)\left(A_{kk}-A_{ll}\right)^2=\left(2s^2-1\right)^2A_{lk}^2. $$ Open the parentheses containing $s$, and we obtain $$ \left(s^2-s^4\right)\left(A_{kk}-A_{ll}\right)^2=\left(4s^4-4s^2+1\right)A_{lk}^2. $$ Rearrange the terms with respect to $s$, and we have $$ \left(4A_{lk}^2+\left(A_{ll}-A_{kk}\right)^2\right)s^4-\left(4A_{lk}^2+\left(A_{ll}-A_{kk}\right)^2\right)s^2+A_{lk}^2=0, $$ or equivalently, $$ s^4-s^2+\frac{A_{lk}^2}{4A_{lk}^2+\left(A_{ll}-A_{kk}\right)^2}=0. $$ Obviously, this is a quadratic equation with respect to $s^2$, i.e., $a\left(s^2\right)^2+b\left(s^2\right)+c=0$. Thus \begin{align} s^2&=\frac{-b\pm\sqrt{b^2-4ac}}{2a}\\ &=\frac{1}{2}\left(1\pm\sqrt{1-\frac{4A_{lk}^2}{4A_{lk}^2+\left(A_{ll}-A_{kk}\right)^2}}\right)\\ &=\frac{1}{2}\left(1\pm\sqrt{\frac{\left(A_{ll}-A_{kk}\right)^2}{4A_{lk}^2+\left(A_{ll}-A_{kk}\right)^2}}\right). \end{align}