You can always check them by talking the derivative of the presumed solution and putting them in the equation. In the first one, I will say that that u= y/x is the correct substitution. Then y= xu so y'= u+ xu'. The differential equation becomes xu'+ u= e^u+ u so xu'= e^u. e^{-u}du= dx/x. Integrating both sides, -e^{-u}= -e^{-y/x)= ln(x)+ C.