My teacher gave us the answer to this problem but I am having trouble showing my work.

$\displaystyle

5m^3(m^3-1)^2-3m^5(m^3-1)^3

$

<< the degree is max(3+3, 5+9)=14 so it's ok
when i work it out step by step i get

$\displaystyle m^3(m^3-1)^2(5-3m^2(m^3-1))$

$\displaystyle m^3(m^3-1)^2(5-3m^5+3m^{\color{red}2})$

**mistake**
$\displaystyle m^3(m^3-1)^2(5-3m^5+3m)$

I pretty much get stuck right there... the answer i should get is:

$\displaystyle

m^3(m-1)^2(m^2+m+1)^2(5+3m^2-3m)^5$

If anyone can figure out how could you list the steps that come to the conclusion? I can deduct what is going on without grammatical explanation, I just need to see the steps.