\(A=2cosx-3cosx-sin\left(3\pi+\frac{\pi}{2}-x\right)+tan\left(\pi+\frac{\pi}{2}-x\right)\)
\(A=-cosx+sin\left(\frac{\pi}{2}-x\right)+tan\left(\frac{\pi}{2}-x\right)\)
\(A=-cosx+cosx+cotx=cotx\)
\(B=2cosx+sin\left(4\pi+\pi-x\right)+sin\left(2\pi-\frac{\pi}{2}+x\right)-sinx\)
\(B=2cosx+sin\left(\pi-x\right)+sin\left(-\frac{\pi}{2}+x\right)-sinx\)
\(B=2cosx+sinx-sin\left(\frac{\pi}{2}-x\right)-sinx\)
\(B=2cosx-cosx=cosx\)