Let $f(x) = \large\frac{px^2+qx+r}{ax+b}$

By quotient rule,

$ f'(x) = \Large\frac{(ax+b)\large\frac{d}{dx}(px^2+qx+r)-(px^2+qx+r)\large\frac{d}{dx}(ax+b)}{(ax+b)^2}$

$ = \Large\frac{(ax+b)(2px+q)-(px^2+qx+r)(a)}{(ax+b)^2}$

$ = \Large\frac{2apx^2+aqx+2bpx+bq-apx^2-aqx-ar}{(ax+b)^2}$

$ = \Large\frac{apx^2+2bpx+bq-ar}{(ax+b)^2}$