Consider the following Equation.
sec2xtanydy+sec2ytanxdx=0
∫tanxsec2xdx=−∫tanysec2ydy
u=1sec2x
dx=sec2x2tanxdu
Similarly,
v=1sec2y
dy=sec2y2tanydv
Therefore,
∫tanxsec2xsec2x2tanxdu=∫tanysec2ysec2y2tanydv
12∫1du=−12∫1dv
u2=−v2+C
12sec2x=−12sec2y+C
cos2x+cos2y=2C
Hence, this is the correct answer.