[tex]~~~~~~~\sin (x+2y) = \cos (2x-y)\\\\\\\implies \dfrac{d}{dx} \sin(x+2y) = \dfrac{d}{dx} \cos (2x-y)\\\\\\\implies \cos(x+2y)\dfrac{d}{dx}(x+2y) = -\sin(2x-y) \dfrac{d}{dx}(2x-y)~~~~~~~~~~~;[\text{Chain rule}]\\\\\\\implies \cos(x+2y) \left(1+2 \dfrac{dy}{dx}\right) = -\sin(2x-y)\left(2-\dfrac{dy}{dx} \right)\\\\\\\implies \cos(x+2y) + 2\cos(x+2y)\dfrac{dy}{dx} = -2\sin(2x-y)+\sin(2x-y) \dfrac{dy}{dx}\\ \\\\[/tex]
[tex]\implies \sin(2x-y) \dfrac{dy}{dx} - 2\cos(x+2y) \dfrac{dy}{dx} = \cos(x+2y) + 2\sin (2x-y)\\\\\\\implies \left[\sin(2x-y) -2\cos(x+2y) \right] \dfrac{dy}{dx} = \cos(x+2y) + 2\sin (2x-y)\\\\\\\implies \dfrac{dy}{dx} = \dfrac{\cos(x+2y) + 2\sin (2x-y)}{\sin(2x-y) -2\cos(x+2y) }[/tex]