Divide the polynomial and write any remainders as a fraction…