6. Let $a$ and $b$ be integers such that in the expanded form of $\left(x^{2}+a x+b\right)^{3}$, the numerical coefficient of $x^{4}$ is 99 and the numerical coefficient of $x$ is 162 . What are the values of $a$ and $b$ ?
Answer: $a=6, b=-3$
Solution: Using the multinomial expansion, the coefficients of $x^{4}$ and $x$ are $3 b+3 a^{2}$ and $3 a b^{2}$, respectively. Thus, we just have to solve the system of equations below.
$$
\begin{aligned}
3\left(b+a^{2}\right) & =99 \\
3 a b^{2} & =162
\end{aligned}
$$

Simplifying, we have $b+a^{2}=33$ and $a b^{2}=54$. Since the left sides of both equations are divisible by 3 , then both $a$ and $b$ are divisible by 3 . Let $b=3 n$ and $a=3 m$, where $m$ and $n$ are integers, then $3 n+9 m^{2}=33$ and $(3 m)\left(9 n^{2}\right)=54$. Simplifying, we have $n+3 m^{2}=11$ and $m n^{2}=2$. From these two equations, we can easily solve for $m$ and $n$. This gives us $m=2$ and $n=-1$. Thus, $a=6$ and $b=-3$.