Long way: try to divide. But we are lazy, so it's no go. Option number one: all rational numbers that could give you a division can be taken from "THE List": you build it by taking the constant term, that is 6, and all its divisors (1,2,3,6), the highest term coefficent, 3 in this case, its divisors (1,3) , and you divide every one in the first list by the second, and adding a [tex]\pm[/tex] in front of them. Our list is: [tex]\pm1, \pm \frac13, \pm2, \pm \frac 23, \pm3, \pm 6 [/tex].
Since -3 is part of THE List, it might be a divisor - that system would garantee you that, for example, x-4 would NOT be a factor.
Cheap way. if (x+3) is a factor of g(x), then g(-3) = 0. Let's replace.
[tex] 3(-3)^3+ 2(3)^2-17(3)+6= \\ 3(-27) +3(18)-17(-3)+6 = -81+54+51+6=-30[/tex]
Since we didn't get zero, [tex](x+3)[/tex] is not a factor of g(x)