Here is my tip..
Choose something that is there so you can change it into another pronumeral...
In this case (x-1)... Let us say it is equal to Y. Now rewrite the equation..
x2Y-Y-30Y
Y(x2-1-30)
(x-1)(x2-31)
That is then answer I got.. BUT.. if the question was something more like... (note: same first step..)
(x-1)x^2 - x(x-1) - 30(x-1)
y x^2 - xy - 30y
y(x^2 - x -30)
(x-1)(x-6)(x+5)
Which is the same answer as you have...
Best of luck and hope I helped...