i pressume you want to solve for $\displaystyle y,$ so an integrating factor for the ODE is $\displaystyle g(x)$ multiply the equation and proceed, it's quite straightforward.
i was taught that the integrating factor is k=e^{g(x)}
$\displaystyle y'e^{g(x)} + g'(x)ye^{g(x)}=g(x)g'(x)$
$\displaystyle (ye^{g(x)})'=g(x)g'(x)$
$\displaystyle (ye^{g(x)})=\int g(x)g'(x) +c$