$\textbf {Step 1}$:
Given $y^x=e^{y-x}$
Take log on both sides, $x \log y=(y-x) \log e$
We know that $\log e = 1$
$ \Rightarrow x\log y=y-x$
$\Rightarrow y=x(1+\log y)$
$\textbf {Step 2}$:
To differentiate $y=x(1+\log y)$, use differentiation by parts, i.e, $d(uv) = vdu +udv$
$\Rightarrow dy = x\;d(1+\log y) dy +(1+\log y) dx$
$\Rightarrow dy = x\;$$\large \frac{1}{y}$ $dy + (1+\log y) dx$
$\Rightarrow dy (1-\large\frac{x}{y}$$)$$=dx(1+\log y)$
$\Rightarrow \large \frac{dy}{dx}$$ =y\large \frac{1+\log y}{y-x}$
$\textbf {Step 3}$:
Substituting for $y-x = x \log y$,
$\Rightarrow \large \frac{dy}{dx}$$ =y\large \frac{1+\log y}{x\log y}$
Substituting for $y = x (1+\log y)$,
$\Rightarrow \large \frac{dy}{dx}$$ =x\;(1+ \log y) \; \large \frac{1+\log y}{x\log y}$
$\Rightarrow \large \frac{dy}{dx}$$ = \large \frac{(1+\log y)^2}{\log y}$