Derivative Chain Rule $f(x) = (3x^2+2)^2 (x^2 -5x)^3$ I'm learning chain rule in derivative, 
and I don't understand this in the example.
$$f(x) = (3x^2+2)^2 (x^2 -5x)^3\\$$
\begin{align}
f'(x)&= (3x^2 +2)^2[3(x^2 -5x)^2(2x-5)] + (x^2-5x)^3[2(3x^2+2)(6x)]
\\&=3(3x^2 +2)(x^2-5x)^2[(3x^2+2)(2x-5)+4x(x^2-5x)]
\\&= 3(3x^2 +2)(x^2-5x)^2[6x^3-15x^2+4x-10+4x^3-20x^2]
\\&=3(3x^2+2)(x^2-5x)^2(10x^3-35x^2+4x-10)
\end{align}
I understand the first line, because they just applied the chain rule,
but I don't understand the second line. I think they are simplifying it, but still I don't understand.
Could anyone explain what happened there? or add extra steps so it's easier??

\begin{align}
f'(x) &= (3x^2 +2)^2[3(x^2 -5x)^2(2x-5)] + (x^2-5x)^3[2(3x+2)(3)]\\
&=3(3x^2+2)(x^2-5x)^2[(2x-5)-(x^2-5x)(2)] \\
&=3(3x^2+2)(x^2-5x)^2[2x-5-4x^2+10x] \\
&=3(3x^2+2)(x^2-5x)^2(-4x^2+12x-5)
\end{align}
