Here's the function that is needed to be solved,
$$ y' = 2 \ - \frac{y}{x}$$
I tried following, Substituting $\frac{y}{x}= t$ so that $ y' = t +x\cdot t' $
So, $$ t+ x\cdot t' = 2\ -t $$
$$2t +x\cdot t' =2 $$
Where $y'= \frac{dy}{dx} \ and \ t' = \ \frac{dt}{dx}$
Now I don't now how to proceed further. Any help is appreciated. Thanks.
Substituting $$y=ux$$ we will get $$y'=u'x+u$$ so $$u'x=2-2u$$ $$\frac{du}{2-2u}=\frac{dx}{x}$$