I am reading an example on mathlab and it is simplifying a derivative using the product rule and the chain rule. I just want to know how the example simplifies without expanding.

$\displaystyle \frac{dy}{dx}=(14(7x-2))(3-x^5)^2+(7x-2)^2(-10x^4(3-x^5))$

=$\displaystyle \frac{dy}{dx}=(2(7x-2)(3-x^5)[-5x^4(7x-2)+7(3-x^5)]$