Step 1: Take logarithms.
The variable \( y \) sits in the exponent, so take \( \log \) on both sides of \( (\cos x)^{y} = (\cos y)^{x} \).
Using \( \log a^{k} = k \log a \), we get
\[ y \log(\cos x) = x \log(\cos y) \]
Step 2: Differentiate both sides with respect to x.
Use the product rule and the chain rule. We know \( \dfrac{d}{dx}\log(\cos x) = -\tan x \) and \( \dfrac{d}{dx}\log(\cos y) = -\tan y \cdot \dfrac{dy}{dx} \).
Left side: \( \dfrac{dy}{dx}\log(\cos x) - y\tan x \).
Right side: \( \log(\cos y) - x\tan y \cdot \dfrac{dy}{dx} \).
Step 3: Collect the terms with dy/dx.
\[ \dfrac{dy}{dx}\log(\cos x) + x\tan y\,\dfrac{dy}{dx} = \log(\cos y) + y\tan x \]
\[ \dfrac{dy}{dx}\left[\log(\cos x) + x\tan y\right] = \log(\cos y) + y\tan x \]
Step 4: Solve for dy/dx.
Divide both sides by the bracket on the left.
Final Answer:
\[ \boxed{\dfrac{dy}{dx} = \dfrac{\log(\cos y) + y\tan x}{\log(\cos x) + x\tan y}} \]