\[ -a^n f(x)^{1-n} g'(x) y(x)^n-\frac {y(x) f'(x)}{f(x)}-f(x) g'(x)+y'(x)=0 \] ✓ Mathematica : cpu = 0.405642 (sec), leaf count = 74
DSolve[-((y[x]*Derivative[1][f][x])/f[x]) - f[x]*Derivative[1][g][x] - a^n*f[x]^(1 - n)*y[x]^n*Derivative[1][g][x] + Derivative[1][y][x] == 0,y[x],x]
\[\text {Solve}\left [y(x) \left (a^n f(x)^{-n}\right )^{\frac {1}{n}} \, _2F_1\left (1,\frac {1}{n};1+\frac {1}{n};-\left (\left (a^n f(x)^{-n}\right )^{\frac {1}{n}} y(x)\right )^n\right )=f(x) g(x) \left (a^n f(x)^{-n}\right )^{\frac {1}{n}}+c_1,y(x)\right ]\] ✓ Maple : cpu = 0.181 (sec), leaf count = 38
dsolve(diff(y(x),x)-a^n*f(x)^(1-n)*diff(g(x),x)*y(x)^n-diff(f(x),x)*y(x)/f(x)-f(x)*diff(g(x),x) = 0,y(x))
\[\frac {a y \left (x \right ) \Phi \left (-\left (\frac {a y \left (x \right )}{f \left (x \right )}\right )^{n}, 1, \frac {1}{n}\right )}{n f \left (x \right )}-a g \left (x \right )+c_{1} = 0\]