We use implicit differentiation. Implicit differentiation is a special case of the chain rule for derivatives. Generally differentiation problems involve functions i.e. #y=f(x)# - written explicitly as functions of #x#.
However, some functions y are written implicitly as functions of #x#. So what we do is to treat #y# as #y=y(x)# and use chain rule. This means differentiating #y# w.r.t. #y#, but as we have to derive w.r.t. #x#, as per chain rule, we multiply it by #(dy)/(dx)#.
Here we are given #xsin2y=ycos2x#. Differentiating we get
#1*sin2y+x*2cos2y*(dy)/(dx)=(dy)/(dx)cos2x-y*2sin2x#
or #sin2y+2xcos2y(dy)/(dx)=cos2x(dy)/(dx)-2ysin2x# ...(A)
or #(dy)/(dx)=(sin2y+2ysin2x)/(cos2x-2xcos2y)# ...(B)
Differentiating (A) again
#2cos2y*(dy)/(dx)+2cos2y(dy)/(dx)-4xsin2y((dy)/(dx))^2+2xcos2y(d^2y)/(dx^2)=-2sin2x(dy)/(dx)+cos2x(d^2y)/(dx^2)-4ycos2x-2sin2x(dy)/(dx)#
or #(cos2x-2xcos2y)(d^2y)/(dx^2)=(4cos2y+4sin2x)(dy)/(dx)-4xsin2y((dy)/(dx))^2+4ycos2x#
= #(4cos2y+4sin2x)(sin2y+2ysin2x)/(cos2x-2xcos2y)-4xsin2y((sin2y+2ysin2x)/(cos2x-2xcos2y))^2+4ycos2x#
Here above we have put the value of #(dy)/(dx)# from (B) and this can give #(d^2y)/(dx^2)#. Remember to divide RHS by #(cos2x-2xcos2y)#.