\[\boxed{\mathbf{305}.}\]
\[P(x) = ax^{3} + x^{2} - 8x - 12\]
\[x = 3:\]
\[P(3) = a \cdot 3^{3} + 3^{2} - 8 \cdot 3 -\]
\[- 12 = 27a - 27\]
\[27a - 27 = 0\]
\[a = 1.\]
\[\left( x^{3} + x^{2} - 8x - 12 \right)\ :(x - 3) =\]
\[= x^{2} + 4x + 4\]
\[x^{2} + 4x + 4 = 0\]
\[(x + 2)^{2} = 0\]
\[x + 2 = 0\]
\[x = - 2.\]
\[Ответ:\ - 2;3.\]