\[ \boxed { {\frac {{\rm d}^{2}}{{\rm d}{x}^{2}}}y \left ( x \right ) +f \left ( x \right ) {\frac {\rm d}{{\rm d}x}}y \left ( x \right ) + \left ( {\frac {\rm d}{{\rm d}x}}f \left ( x \right ) +a \right ) y \left ( x \right ) -g \left ( x \right ) =0} \]
Mathematica: cpu = 0.203026 (sec), leaf count = 31 \[ \text {DSolve}\left [y(x) \left (a+f'(x)\right )+f(x) y'(x)-g(x)+y''(x)=0,y(x),x\right ] \]
Maple: cpu = 0.171 (sec), leaf count = 36 \[ \left \{ y \left ( x \right ) ={\it DESol} \left ( \left \{ {\frac { {\rm d}^{2}}{{\rm d}{x}^{2}}}{\it \_Y} \left ( x \right ) +f \left ( x \right ) {\frac {\rm d}{{\rm d}x}}{\it \_Y} \left ( x \right ) + \left ( {\frac {\rm d}{{\rm d}x}}f \left ( x \right ) +a \right ) {\it \_Y} \left ( x \right ) -g \left ( x \right ) \right \} , \left \{ {\it \_Y} \left ( x \right ) \right \} \right ) \right \} \]