Let #f(x) = x^4-2x^3-13x^2+38x-24#
First notice that the sum of the coefficients is #0#, so #f(1) = 0# and #(x-1)# is a factor of #f(x)#.
#x^4-2x^3-13x^2+38x-24#
#=(x^4-x^3)-(x^3-x^2)-(14x^2-14x)+(24x-24)#
#=x^3(x-1)-x^2(x-1)-14x(x-1)+24(x-1)#
#=(x^3-x^2-14x+24)(x-1)#
Let #g(x) = x^3-x^2-14x+24#
By the rational roots theorem, any rational root of #g(x) = 0# must be a factor of #24# and hence one of:
#+-1#, #+-2#, #+-3#, #+-4#, #+-6#, #+-12#, #+-24#
We soon find #g(2) = 8-4-28+24 = 0#,
so #(x-2)# is a factor of #g(x)#
#x^3-x^2-14x+24#
#= (x^3-2x^2) + (x^2-2x) - (12x-24)#
#=x^2(x-2)+x(x-2)-12(x-2)#
#=(x^2+x-12)(x-2)#
Then #x^2+x-12 = (x+4)(x-3)# by finding two numbers whose product is #12# and whose difference is #1#
Putting it all together:
#x^4-2x^3-13x^2+38x-24#
#= (x-1)(x-2)(x-3)(x+4)#