According to factor theorem, if #alpha# is a zero of a polynomial #f(x)# with rational coefficients (where #p# is a coefficient of highest degree and #q# is constant term), then #x-alpha# is a factor of #f(x)# and #alpha# is a factor of #q/p#.
As #6x^3+25x^2-31x-30# has constant term #-30# and we can have factors of #(-30)/6# as zeros of #f(x)#. Let #p=1# and try just for factors of #-30# which could be #+-1,+-2,+-3,+-5,....#.
It may be seen by trial that #f(-5)=0# and hence #x+5# is a factor of #6x^3+25x^2-31x-30#. Dividing this by #x+5#, we can get a quadratic polynomial which can be easily factorized by splitting terms if discriminant is square of rational number, as shown below.
#f(x)=6x^3+25x^2-31x-30#
= #6x^2(x+5)-5x(x+5)-6(x+5)#
= #(x+5)(6x^2-5x-6)#
= #(x+5)(6x^2-9x+4x-6)#
= #(x+5)(2x-3)(3x+2)#