I'm assuming you want to find dydx. For this we first need an expression for y in terms of x. We note that this problem has various solutions, since tan(x) is a periodic functions, tan(x−y)=x will have multiple solutions. However, since we know the period of the tangent function (π), we can do the following: x−y=tan−1x+nπ, where tan−1 is the inverse function of the tangent giving values between −π2 and π2 and the factor nπ has been added to account for the periodicity of the tangent.
This gives us y=x−tan−1x−nπ, therefore dydx=1−ddxtan−1x, note that the factor nπ has disappeared. Now we need to find ddxtan−1x. This is quite tricky, but doable using the reverse function theorem.
Setting u=tan−1x, we have x=tanu=sinucosu, so dxdu=cos2u+sin2ucos2u=1cos2u, using the quotient rule and some trigonometric identities. Using the inverse function theorem (which states that if dxdu is continuous and non-zero, we have dudx=1dxdu), we have dudx=cos2u. Now we need to express cos2u in terms of x.
To do this, we use some trigonometry. Given a right triangle with sides a,b,c where c is the hypotenuse and a,b connected to the right angle. If u is the angle where side c intersects side a, we have x=tanu=ba. With the symbols a,b,c in the equations we denote de length of these edges. cosu=ac and using Pythagoras theorem, we find c=√a2+b2=a√1+(ba)2=a√1+x2. This gives cosu=1√1+x2, so dudx=11+x2.
Since u=tan−1x, we can substitute this into our equation for dydx and find dydx=1−11+x2=x21+x2.