\(=\dfrac{tan\left(\dfrac{pi}{2}+x\right)\cdot sin\left(-x\right)\cdot cos\left(x-pi\right)}{cos\left(\dfrac{pi}{2}-x\right)\cdot sin\left(x+pi\right)}\)
\(=\dfrac{-cotx\cdot sin\left(-x\right)\cdot\left(-cosx\right)}{sinx\cdot-sinx}\)
\(=\dfrac{cotx\cdot sinx\left(-1\right)\cdot cosx}{-sinx\cdot sinx}=\dfrac{\dfrac{cosx}{sinx}\cdot cosx}{sinx}=\dfrac{cos^2x}{sin^2x}=cot^2x\)