Firstly, (x - c) is a factor of a polynomial P(x) if and only if there exists a polynomial Q(x) such that P(x) = (x - c)Q(x), where c is a real or complex constant.
Therefore, we can write: P(x) = x^3 + ax^2 - 7x + 6 = (x + 3)(ux^2 + vx + w), where u, v, and w are constants. Now, u = 1 and w = 2, which we find by equating coefficients when we expand the brackets on the R.H.S.
To find v, we expand the brackets to give:
x^3 + ax^2 - 7x + 6 = x^3 + 3x^2 + vx^2 + 3vx + 2x + 6 = x^3 + (3 + v)x^2 + (3v + 2)x + 6.
By equating coefficients we find that v = -3, and that a = 0. Hence, P(x) = x^3 - 7x + 6 = (x + 3)(x - 1)(x - 2).
Therefore: a = 0, and the other two factors of P(x) are (x - 1) and (x - 2).