I assume you mean \(3x^3\) and not \(3x^2\), because it is impractical to write polynomials in an un-simplified way. (I hope you understand what I meant, my English is not that good)
We state the factor theorem as follows:
Let \(p(x)\) be a polynomial. If \(p(x)\) is divisible by \(x - k\), then \(p(k) = 0\).
This is a well-known result in algebra. We prove it using division algorithm: Suppose that when p(x) is divided by x - k, the quotient is q(x) and the remainder is r. (The remainder is a constant because it must have lower degree than the divisor x - k.) By division algorithm, we must have \(p(x) = (x - k)q(x) + r\), substituting x = k gives \(r = p(k) + 0q(k) = p(k)\). Therefore the factor theorem is equivalent to saying "If p(x) is divisible by x - k, then the remainder is 0 when p(x) is divided by by x - k", which is obviously true.
We can use this result to solve the problem. From the factor theorem, we know that \(f(3) = 0\). Then, substituting x = 3 into the definition of f(x) gives \(3k -87 = 0\), which gives k = 29.
Suppose \(f(x) = (x - 3)(ax^2 + bx + c)\). Then \(ax^3 + (b - 3a)x^2 + (c - 3b)x - 3c = 3x^2 - 20x^2 + 29x + 12\). Comparing coefficients gives \(a = 3, b = -11, c = -4\). Then we have \(f(x) = (x - 3)(3x^2 - 11x - 4)\). Factorizing the quadratic part further, we have \(f(x) = (x - 3)(3x + 1)(x - 4)\).
For the bonus part, simple inspection gives the roots x = 3, x = 4, and x = -1/3.