\(\dfrac{2}{sinx}-\dfrac{sinx}{1+cosx}\)
\(=\dfrac{2+2cosx-sin^2x}{sinx\left(1+cosx\right)}=\dfrac{2\left(1+cosx\right)-\left(1-cos^2x\right)}{sinx\left(1+cosx\right)}\)
\(=\dfrac{\left(1+cosx\right)\left(2-1+cosx\right)}{sinx\left(1+cosx\right)}=\dfrac{cosx+1}{sinx}\)