\(x^3+\left(2m+5\right)x^2+\left(2m+6\right)x-4m-12=\left(x^3-x^2\right)+\left[\left(2m+6\right)x^2-\left(2m+6\right)x\right]+\left[\left(4m+12\right)x-\left(4m+12\right)\right]=\left[x^2+\left(2m+6\right)x+\left(4m+12\right)\right]\left(x-1\right)\)