If all you want is to find some solution of the ODE, well, then finding one particular solution $x_p(t)$ is enough. But that solution might not be the right one, if you have additional conditions (boundary values, etc.). Usually one needs to know all the solutions of the ODE, in order to pick the one that satisfies the extra conditions.
The computation that you have reproduced from your textbook shows that $x_p(t)+x_c(t)$ is another solution of the same ODE (if $x_c(t)\neq 0$), so this indicates a way of finding more solutions than just $x_p(t)$. (The point here is that, as you have realized, only $x_p(t)$ gives a contribution $f(t)$ to the right-hand side, and adding $x_c(t)$ doesn't spoil that.)
But that still doesn't really explain the main issue, which is that you find all the solutions in this way. This is where the subtraction argument comes in. Suppose you have happened to find one particular solution $x_{p,1}(t)$ while your friend found another one $x_{p,2}(t)$. Then the difference $x_c(t)=x_{p,2}(t)-x_{p,1}(t)$ will satisfy the homogeneous equation, since you get $\ldots=f(t)-f(t)=0$ in the right-hand side when plugging in. So two different particular solutions to your ODE can't be arbitrarily different; they can only differ by a solution to the homogeneous ODE. That's why you know all the solutions to your ODE if you know (a) one of them to begin with, and (b) all the solutions $x_c(t)$ of the homogeneous equation.
Best Answer
To be honest I think it's BS to teach separable variables like this without the Riemann-Stieljes integral.
The way I solve them is by doing what actually is done: integrate with respect to $x$ on both sides.
Remember that $y$ is a function (on the variable $x$). So your differential equation is, for all $x$ in a certain interval, $y'(x)=\dfrac{y(x)}{x}$ or equivalently $\dfrac{y'(x)}{y(x)}=\dfrac {1}{x}$and integrating with respect to $x$ you get the desired result.
In my opinion integrating with respect to $y$ is nothing more than a cheap trick, the same way $\dfrac{dy}{dx}=1\iff dy=dx$ is a cheap trick. It works only because of some higher math.
More generally, if you can rewrite your DE as $g(y(x))y'(x)=f(x)$ for some functions $f$ and $g$ that have antiderivatives, $F$ and $G$, in the given interval, then $g(y(x))y'(x)=f(x)\iff G(y(x))=F(x)+C$, for some $C\in \Bbb R$. (To establish $\Longleftarrow$ just differentiate). And if we're lucky enough for $G$ to be invertible, we get $y(x)=G^{-1}\left(F(x)+C\right)$. If $G$ isn't invertible, then hopefully the implicit function theorem will yield the solutions to the DE implicitly by the equation $G(y(x))=F(x)+C$.
In your example $g$ is the function $t\mapsto \dfrac{1}{t}$ which has $t\to \log (|t|)$ as an antiderivative. (Don't forget the absolute value).