We have, using the identity $ \cos 2\theta=1-2\sin^2\theta$, that $$\tag{1}\cos\bigl( 2\,{\rm arccot}\,{\textstyle{\sqrt x\over\sqrt y}}\,\bigr)= 1-2\,\sin^2\bigl( {\rm arccot}{\textstyle{\sqrt x\over\sqrt y}}\,\bigr).$$
To simplify $\sin \bigl( {\rm arccot}{\textstyle{\sqrt x\over\sqrt y}}\bigr)$, let $\theta= {\rm arccot}{\sqrt x\over\sqrt y}$ and draw a right triangle with one non-right angle $\theta= {\rm arccot}{\sqrt x\over\sqrt y}$. Then the cotangent of $\theta$ is $\sqrt x/\sqrt y$. Thus, we may take the length of the side of the triangle adjacent to $\theta$ to be $\sqrt x$ and the length of the side of the triangle opposite to $\theta$ to be $\sqrt y$. The Pythagorean Theorem then gives the length of the hypotenuse of the triangle to be ${ \sqrt{x+y}}$. Now, reading from the triangle, we have $$\tag{2} \sin \bigl( {\rm arccot}{\textstyle{\sqrt x\over\sqrt y}}\bigr)= {\sqrt y\over \sqrt{x+y}} $$
Substituting $(2)$ into $(1)$ gives: $$\eqalign{ \cos\bigl( 2\,{\rm arccot}\,{\textstyle{\sqrt x\over\sqrt y}}\,\bigr)= 1-2\,\sin^2\bigl( {\rm arccot}{\textstyle{\sqrt x\over\sqrt y}}\,\bigr) &= 1-2\Bigl[{ {\sqrt y\over \sqrt{x+y}}}\Bigr]^2\cr &={x+y\over x+y}-{2y\over x+y}\cr &={x-y\over x+y}. } $$ This establishes the identity since $$ \cos\bigl( {\rm arccos}\,{\textstyle{x-y\over x+ y}}\,\bigr) ={x-y\over x+y}. $$
(The cosine function is one-to-one on $[0,\pi]$, ${\rm arccos}\,{\textstyle{x-y\over x+ y}}\in[0,\pi]$, and $2\, {\rm arccot}{\textstyle{\sqrt x\over\sqrt y}}\in(0,\pi ]$.)