\[ -f(x) g\left (x^a y(x)\right )+a y(x)+x y'(x)=0 \] ✓ Mathematica : cpu = 3.05133 (sec), leaf count = 41
DSolve[-(f[x]*g[x^a*y[x]]) + a*y[x] + x*Derivative[1][y][x] == 0,y[x],x]
\[\text {Solve}\left [\int _1^{x^a y(x)}\frac {1}{g(K[1])}dK[1]=\int _1^xf(K[2]) K[2]^{a-1}dK[2]+c_1,y(x)\right ]\] ✓ Maple : cpu = 0.285 (sec), leaf count = 33
dsolve(x*diff(y(x),x)+a*y(x)-f(x)*g(x^a*y(x)) = 0,y(x))
\[y \left (x \right ) = \RootOf \left (-\left (\int x^{a -1} f \left (x \right )d x \right )+\int _{}^{\textit {\_Z}}\frac {1}{g \left (\textit {\_a} \right )}d \textit {\_a} +c_{1}\right ) x^{-a}\]