Prove that $\operatorname{arccot}\frac{1-x\sin\phi}{x\cos\phi}-\operatorname{arccot}\frac{\cos\phi}{x-\sin\phi}=\phi$

I used the formula $\cot(\alpha-\beta)=\frac{\cot\alpha\cot\beta+1}{\cot\alpha-\cot\beta}$ with $\alpha=\operatorname{arccot}\frac{1-x\sin\phi}{x\cos\phi}$ and $\beta=\operatorname{arccot}\frac{\cos\phi}{x-\sin\phi}$ What I got is as it follows: $$\frac{\frac{1-x\sin\phi}{x\cos\phi}.\frac{\cos\phi}{x-\sin\phi}+1}{\frac{1-x\sin\phi}{x\cos\phi}-\frac{\cos\phi}{x-\sin\phi}}$$ And after some calculations I got that it's equal to: $$\frac{(1-x\sin\phi+x-\sin\phi)cos\phi}{x-\sin\phi-x^2\sin\phi+x\sin^2\phi-x\cos^2\phi}$$ Which If I prove that equals $\cot\phi$ would prove the equality. However I have problems with the last steps, was it a mistake in my calculations or simply wrong approach?

\begin{aligned} \cot(\alpha-\beta)&=\frac{\frac{1-x\sin\phi}{x\cos\phi}\cdot\frac{\cos\phi}{x-\sin\phi}+1}{\frac{\cos\phi}{x-\sin\phi}-\frac{1-x\sin\phi}{x\cos\phi}}\\ &=\frac{(1-x\sin\phi)\cos\phi+x\cos\phi(x-\sin\phi)}{x\cos^2\phi-(1-x\sin\phi)(x-\sin\phi)}\\ &=\frac{\cos\phi(1-x\sin\phi+x^2-x\sin\phi)}{x(1-\sin^2\phi)-x+\sin\phi+x^2\sin\phi-x\sin^2\phi}\\ &=\frac{\cos\phi(1+x^2-2x\sin\phi)}{-2x\sin^2\phi+\sin\phi+x^2\sin\phi}\\ &=\frac{\cos\phi(1+x^2-2x\sin\phi)}{\sin\phi(1+x^2-2x\sin\phi)}\\ &=\frac{\cos\phi}{\sin\phi}\\ &=\cot\phi \end{aligned}