Given that $x+ y =\pi\implies y = \pi - x$
Now$,\cot \dfrac{x}{2}+\cot\dfrac{y}{2} = \cot \dfrac{x}{2} + \cot(\frac{\pi-x}{2})$
$\implies \cot \dfrac{x}{2}+\cot\dfrac{y}{2} = \cot \dfrac{x}{2} + \cot(\frac{\pi}{2} - \frac{x}{2})$
$\implies \cot \dfrac{x}{2}+\cot\dfrac{y}{2} = \cot \dfrac{x}{2} + \tan \dfrac{x}{2} = \dfrac{ \cos \frac{x}{2}}{ \sin \frac{x}{2}} + \dfrac{ \sin \frac{x}{2}}{ \cos \frac{x}{2}} =\dfrac{\cos^{2} \frac{x}{2} + \sin^{2} \frac{x}{2}}{ \sin \frac{x}{2}\cdot\cos \frac{x}{2}}$
$\implies \cot \dfrac{x}{2}+\cot\dfrac{y}{2} = \dfrac{1}{\sin \frac{x}{2}\cdot\cos \frac{x}{2}} \:\:\:\:\:\: \bigg[\therefore \:\sin ^{2}\theta + \cos ^{2}\theta = 1\bigg]$
$\implies \cot \dfrac{x}{2}+\cot\dfrac{y}{2} = \dfrac{2}{2\sin \frac{x}{2}\cdot\cos \frac{x}{2}} = \dfrac{2}{\sin x} = 2\: \text{cosec } x\:\:\:\:\:\:\bigg[\therefore \:2\sin \theta\cdot \cos\theta = \sin 2\theta \bigg]$
So, the correct answer is $(A).$