\(\left(x^2+5x\right)^2-2\left(x^2+5x\right)-24\\ =\left[\left(x^2+5x\right)^2-6\left(x^2+5x\right)\right]+\left[4\left(x^2+5x\right)-24\right]\\ =\left(x^2+5x\right)\left(x^2+5x-6\right)+4\left(x^2+5x-6\right)\\ =\left(x^2+5x-6\right)\left(x^2+5x+4\right)\\ =\left(x^2-x+6x-6\right)\left(x^2+4x+x+4\right)\\ =\left[x\left(x-1\right)+6\left(x-1\right)\right]+\left[x\left(x+4\right)+\left(x+4\right)\right]\\ =\left(x-1\right)\left(x+1\right)\left(x+4\right)\left(x+6\right)\)
(x2+5x)2−2(x2+5x)−24=[(x2+5x)2−6(x2+5x)]+[4(x2+5x)−24]=(x2+5x)(x2+5x−6)+4(x2+5x−6)=(x2+5x−6)(x2+5x+4)=(x2−x+6x−6)(x2+4x+x+4)=[x(x−1)+6(x−1)]+[x(x+4)+(x+4)]=(x−1)(x+1)(x+4)(x+6)