\(A=\cos\left(\text{π}-\dfrac{x}{2}\right)-\sin\left(\text{π}-x\right)\)
\(=\sin x+\sin x=2\cdot\sin x\)
\(B=\cos\left(2\text{π}+\dfrac{\text{π}}{2}-x\right)+\sin\left(4\text{π}+\dfrac{\text{π}}{2}-x\right)-\cos\left(6\text{π}+\dfrac{3}{2}\text{π}+x\right)-\sin\left(16\text{π}+\dfrac{3}{2}\text{π}+x\right)\)
\(=\sin x+\cos x-\cos\left(\dfrac{3}{2}\text{π}+x\right)-\sin\left(\dfrac{3}{2}\text{π}+x\right)\)
\(=\sin x+\cos x-\cos\left(\text{π}+\dfrac{\text{π}}{2}+x\right)-\sin\left(\text{π}+\dfrac{\text{π}}{2}+x\right)\)
\(=\cos x+\sin x+\cos\left(\dfrac{1}{2}\text{π}+x\right)+\sin\left(\dfrac{1}{2}\text{π}+x\right)\)
\(=\cos x+\sin x-\sin x+\cos x=2\cos x\)