Let $f(x) = (ax+b)(cx+d)^2$

By Leibnitz product rule

$ f'(x) = (ax+b)\large\frac{d}{dx}$$(cx+d)^2 + (cx+d)^2\large\frac{d}{dx}$$(ax+b)$

$ = (ax+b) \large\frac{d}{dx}$$(c^2x^2+2cdx+d^2)+(cx+d)^2\large\frac{d}{dx}$$(ax+b)$

$ (ax+b) \bigg[ \large\frac{d}{dx}$$(c^2x^2)+ \large\frac{d}{dx}$$(2cdx)+\large\frac{d}{dx}$$d^2 \bigg]$$+ (cx+d)^2 \bigg[ \large\frac{d}{dx}$$ax+ \large\frac{d}{dx}$$b \bigg]$

$ = (ax+b) (2c^2x+2cd)+(cx+d^2)a$

$ = 2c(ax+b)(cx+d)+a(cx+d^2)$