For example, to solve $$\frac{dy}{dx} = \frac{x-5}{y^2}$$
we turn the equation into
$$y^2dy = (x-5)dx$$
Even though $\frac{dy}{dx} = \frac{d}{dx}(y)$ is not a fraction. The $\frac{d}{dx}$ notation denotes an unary operation (I think).
This abuse of notation has been discussed extensively on here, but I haven't seen any posts explaining why it works in the case of the separation technique of solving differential equations. Can anyone explain/point me to an appropriate resource?