I used to know a trick to solve cubic polynomials, but that has long since escaped me.
Here's a
pretty complex formula that will give you your roots directly.
You can also take a brute force approach that you can use is the
Rational Root Theorem. Essentiallty what it says is that for any polynomial, each rational root will have the property that x = p/q wher q is a factor of your x^0 term and q is a factor of your x^n term.
In your case, it's pretty easy.
p has to be +-1 or +-3 and q has to be +=1
So all combinations will give you the following values of x. Once you have those, you plug them into your original equation and find the ones that make the roots.
Code:
x = 1 ==> f(1) = 1 - 10 + 3 => -6
x = -1 ==> f(-1) = -1 + 10 + 3 => 12
x = 3 ==> f(3) = 27 - 30 + 3 => 0 <-- Rational root
x = -3 ==> f(-3) = -27 + 30 + 3 => 6
So as Karthik pointed out, since 3 is a root, (x - 3) is a factor. From there you should follow his other suggestion of using synthetic division.
I also came across
this page which has some pretty good examples. In particular, you may want to take note of the Intermediate Value Theorem. They also talk about synthetic division if you need a refresher.