To solve for a, you need to bring "a" in one side and the other terms in the other side...
[tex]tan(x) = \frac{o}{a} \\~\\a.tan(x)=o\\~\\a= \frac{o}{tan(x)} [/tex]
and you can change 1/tan(x) and write it as cot(x) if you want...
[tex]a=o.cot(x)[/tex]
I hope you got
the idea!