How to understand this polar coordinate transformation of ODE

First of all there is a typo in your question and it is $u_x = \frac{\partial u}{\partial x}~.$ Actually it is $~u_x = \frac{d u}{d x}~$ as here $~u=u(x)~$. Now come to the answer of the question "How to obtain this final result ?"

Answer: The polar coordinate transformation is $$x = r\cos\theta, \ \ \ \ \ u = r\sin\theta$$ So $$dx=d\left(r\cos\theta\right)=\cos\theta~dr~-~r\sin\theta~d\theta$$ and $$du=d\left(r\sin\theta\right)=\sin\theta~dr~+~r\cos\theta~d\theta$$ Now the given equation is $$(u-x)u_x+u+x=0$$ $$\implies (u-x)du+(u+x)dx=0$$ $$\implies (r\sin\theta-r\cos\theta)(\sin\theta~dr~+~r\cos\theta~d\theta)+(r\sin\theta+r\cos\theta)(\cos\theta~dr~-~r\sin\theta~d\theta)=0$$ $$\implies rdr\left[\sin^2\theta-\sin\theta\cos\theta+\sin\theta\cos\theta+\cos^2\theta\right]+r^2d\theta\left[\sin\theta\cos\theta-\cos^2\theta-\sin^2\theta-\sin\theta\cos\theta\right]=0$$ $$\implies dr~+~rd\theta=0$$ $$\implies \dfrac{dr}{d\theta}+r=0$$


The trajectories, solution curves, of $$ \frac{du}{dx}=\frac{u+x}{x-u} $$ can be obtained as the solutions of the linear system $$ \pmatrix{\dot x(t)\\\dot u(t)}=\pmatrix{1&-1\\1&1}\pmatrix{x(t)\\u(t)} $$ The matrix corresponds to the complex number $1+i$, so that $$ \frac{d}{dt}(x(t)+iu(t))=(1+i)(x(t)+iu(t)) $$ which can now be solved as scalar complex-valued equation. At the same time it exhibits why it would make sense to consider the polar decomposition of $x+iu$ at all.