I am learning simple differential equations, and I know that the way they are solved is basically some magic with $dy$ and $dx$ behaving like normal fractions but then suddenly being integrated and I find this whole thing a bit weird as I can't explain to myself how come this works. However, while trying to solve a simple equation $y' = y + a$, I came up with this: $$ \frac{dy}{dx} = y + a \\ \frac{dy}{y+a} = dx \\ \int \frac{1}{y+a} dy = \int 1 dx \\ \text{substitute u = y + a} \\ \text{therefore dy = d(u - a) = du - da} \\ \int \frac{1}{u} du - da = \int 1 dx \\ \int \frac{1}{u} du - \int 1 da = \int 1 dx \\ \ln u - a = x \\ \ln (y+a) = x + a \\ y = e^{x+a} - a $$ I checked the solution and it seems correct but the whole substitution thing seems a bit... sketchy to me. Therefore I ask, is this a valid way of solving differential equations?
Note: I omitted the constants for simplification