(x-1)(x-2)(x-3)(x-4)-24
=[(x-1)(x-4)][(x-2)(x-3)]-24
=[(x^2-5x)+4][(x^2-5x)+6]-24
=(x^2-5x)^2+10(x^2-5x)+24-24
=(x^2-5x)^2+10(x^2-5x)
=(x^2-5x)(x^2-5x+10)
=x(x-5)(x^2-5x+10)
(x-1)(x-2)(x-3)(x-4)-24
=[(x-1)(x-4)][(x-2)(x-3)]-24
=[(x^2-5x)+4][(x^2-5x)+6]-24
=(x^2-5x)^2+10(x^2-5x)+24-24
=(x^2-5x)^2+10(x^2-5x)
=(x^2-5x)(x^2-5x+10)
=x(x-5)(x^2-5x+10)