Here,
#p(x)=x^3-4x^2-11x+30#
For #x=2#,
#p(2)=2^3-4(2)^2-11(2)+30=8-16-22+30=0#
#=>(x-2)#, is a factor.
#:.p(x)=x^3-2x^2-2x^2+4x-15x+30#
#=>p(x)=x^2color(green)((x-2))-2xcolor(green)((x-2))-15color(green)((x-2))#
#=>p(x)=(x-2)(x^2color(red)(-2x)-15)#
#=>p(x)=(x-2)[x^2color(red)(-5x+3x)-15]#
#=>p(x)=(x-2)[xcolor(blue)((x-5))+3color(blue)((x-5))]#
#=>p(x)=(x-2)(x-5)(x+3)#