\[ \int \frac {(d+e x)^m \left (a+b x+c x^2\right )}{(f+g x)^2} \, dx \]
Optimal antiderivative \[ \frac {c \left (e x +d \right )^{1+m}}{e \,g^{2} \left (1+m \right )}+\frac {\left (a +\frac {f \left (-b g +c f \right )}{g^{2}}\right ) \left (e x +d \right )^{1+m}}{\left (-d g +e f \right ) \left (g x +f \right )}+\frac {\left (c f \left (2 d g -e f \left (2+m \right )\right )-g \left (a e g m +b \left (d g -e f \left (1+m \right )\right )\right )\right ) \left (e x +d \right )^{1+m} \hypergeom \! \left (\left [1, 1+m \right ], \left [2+m \right ], -\frac {g \left (e x +d \right )}{-d g +e f}\right )}{g^{2} \left (-d g +e f \right )^{2} \left (1+m \right )} \]
command
Integrate[((d + e*x)^m*(a + b*x + c*x^2))/(f + g*x)^2,x]
Mathematica 13.1 output
\[ \int \frac {(d+e x)^m \left (a+b x+c x^2\right )}{(f+g x)^2} \, dx \]
Mathematica 12.3 output
\[ \frac {(d+e x)^{m+1} \left (e^2 \left (g (a g-b f)+c f^2\right ) \, _2F_1\left (2,m+1;m+2;\frac {g (d+e x)}{d g-e f}\right )-e (2 c f-b g) (e f-d g) \, _2F_1\left (1,m+1;m+2;\frac {g (d+e x)}{d g-e f}\right )+c (e f-d g)^2\right )}{e g^2 (m+1) (e f-d g)^2} \]