Find value of $\sin x-\frac{1}{\cot x}$ If $\sin x+\frac{1}{\cot x}=3$, calculate the value of $\sin x-\frac{1}{\cot x}$

Please kindly help me

Let $\sin x -\frac{1}{\cot x}=t$
Then, $$\sin x= \frac{3+t}{2}, \cot x= \frac{2}{3-t}$$
By using $$1+\cot ^2x= \frac{1}{\sin^2 x}$$
Then, the equation $$t^4-18t^2+48t+81=0$$

Let $\tan{x}=y$.
Thus, $$\sin{x}+y=3,$$ which gives
$$\sin^2x=(3-y)^2$$ or
$$\frac{y^2}{1+y^2}=(3-y)^2$$ or
$$y^4-6y^3+9y^2-6y+9=0$$ or for any real $k$
$$(y^2-3y+k)^2-(2ky^2-6(k-1)y+k^2-9)=0.$$
Now, we'll choose a value of $k$, for which $k>0$ and $$2ky^2-6(k-1)y+k^2-9=(ay+b)^2,$$
for which we need $$9(k-1)^2-2k(k^2-9)=0$$ or
$$2k^3-9k^2-9=0,$$ which by the Cardano's formula gives:
$$k=\frac{3+3\sqrt[3]3+\sqrt[3]9}{2}$$ and we obtain:
$$\left(y^2-3y+\frac{3+3\sqrt[3]3+\sqrt[3]9}{2}\right)^2-(3+3\sqrt[3]3+\sqrt[3]9)\left(y-\frac{3+3\sqrt[3]3-\sqrt[3]9}{2}\right)^2=0,$$
which gives two quadratic equations.
One of them has no real roots.
The second gives two real roots:
$$\frac{\sqrt[3]3}{2}\left(\sqrt[3]9+\sqrt{1+\sqrt[3]3+\sqrt[3]9}-\sqrt{2\sqrt{2(\sqrt[3]3-1)}-(\sqrt[3]3-1)^2}\right)$$ and
$$\frac{\sqrt[3]3}{2}\left(\sqrt[3]9+\sqrt{1+\sqrt[3]3+\sqrt[3]9}+\sqrt{2\sqrt{2(\sqrt[3]3-1)}-(\sqrt[3]3-1)^2}\right)$$ and we obtain:
$$\sin{x}-\tan{x}=3-2y=\sqrt[3]3\left(-\sqrt{1+\sqrt[3]3+\sqrt[3]9}+\sqrt{2\sqrt{2(\sqrt[3]3-1)}-(\sqrt[3]3-1)^2}\right)$$ or $$\sin{x}-\tan{x}=-\sqrt[3]3\left(\sqrt{1+\sqrt[3]3+\sqrt[3]9}+\sqrt{2\sqrt{2(\sqrt[3]3-1)}-(\sqrt[3]3-1)^2}\right).$$
