The expression $x^3 + ax^2 + bx + 6$ has $\left(x - 2\right)$ as a factor and leaves a remainder $3$ when divided by $\left(x - 3\right)$. Find '$a$' and '$b$'.
Let $\;$ $f \left(x\right) = x^3 + ax^2 + bx + 6$
Given: $\;$ $\left(x - 2\right)$ is a factor of $f\left(x\right)$
Then, by factor theorem, $\;$ $f \left(2\right) = 0$
i.e. $\;$ $2^3 + a \times 2^2 + b \times 2 + 6 = 0$
i.e. $\;$ $4a + 2b + 14 = 0$
i.e. $\;$ $2a + b = - 7$ $\;\;\; \cdots \; (1)$
Given: $\;$ $f \left(x\right)$ when divided by $\left(x - 3\right)$ leaves a remainder $3$.
Then, by remainder theorem, $\;$ $f \left(3\right) = 3$
i.e. $\;$ $3^3 + a \times 3^2 + b \times 3 + 6 = 3$
i.e. $\;$ $9a + 3b + 12 = 0$
i.e. $\;$ $3a + b = - 4$ $\;\;\; \cdots \; (2)$
Solving equations $(1)$ and $(2)$ simultaneously we have,
$a = 3$ $\;$ and $\;$ $b = - 13$