A method for finding a particular solution of a non-homogeneous differential equation is given by the variation of parameters formula.
This resembles the reduction of order method in the sense that we make an assumption on the form the solution $x=x_{1}v$ and then solve for $v$.
How do we really know that this is a solution in the end? We only said,
If $x$ satisfy the equation and is of the form $x=v_{1}x_{1}+v_{2}x_{2}$ then $v_{1}=..$ and $v_{2}=..$ making it nessesary but not sufficent.
The idea is simple, if we have an equation of the form $$xy+y'=g(x) \quad \text{ for exemple}$$ In general, it is not easy to find a closed form of the solution directly, so we try to solve a similar equation but easier which is the homogeneous one $$xy+y'=0$$ Hence one has a solution $y_h(x)=ce^{-\frac{x^2}{2}}$ for this last equation, now we think about the non-homogeneous equation which her solution seems to be pretty close to $y_h$. So let's variate $y_h$ to be its solution, now we can try to find a solution of the form $y_g(x)=v(x)y_h(x)$ or $y_g(x)=y_h(x) +v(x)$ the choice is up to you (up to the simplicity of the calculs), here we choice $y_g(x)=y_h(x) +v(x)$ so
$$ xy_g(x)+y_g'(x)=cxe^{-\frac{x^2}{2}} +xv(x)-cxe^{-\frac{x^2}{2}}+v'(x)=g(x) $$ $$ \Rightarrow xv(x) +v'(x)=g(x)$$ $$ \Rightarrow (xv(x) +v'(x))e^{\frac{x^2}{2}}=g(x)e^{\frac{x^2}{2}}$$ $$ \Rightarrow \frac{d}{dx}(v(x)e^{\frac{x^2}{2}})=g(x)e^{\frac{x^2}{2}}$$
which can be solvable mostly, then we get the correction factor which we use to transform $y_h$ into a solution of the non-homogenous equation!
I hope that this can help