Divide the polynomial in the numerator by the trinomial in the denominator
m^3-m^2-4m+1
/m^2+2m-3
m^3-m^2-4m+1
/m^2+2m-3