dy/dx doesnt equal w it equals tan w and it is infact tan x as well.
dy/dx = tanx - because the function when differentiated is tanx
dy/dx = tanw - As you know by definition of an intrinsic equation
So in this special case x = w
If it was a different function then this would not be the case. You'd then have to find a relationship between x = w.