Answer
$x=3a^{2} +4a-2$
Work Step by Step
Subtract 4 from both sides and factor x out on the LHS.
$ x(a+2)=3a^{3}+10a^{2}+6a-4\quad$... divide with $(a+2)$
$ x=\displaystyle \frac{3a^{3}+10a^{2}+6a-4}{a+2}\quad$... perform long division
$ \begin{array}{llllllll}
& & 3a^{2} & +4a & -2 & & & \color{red}{ \small{Quotient}} \\
& & -- & -- & -- & -- & & \\
a+2 & ) & 3a^{3} & +10a^{2} & +6a & -4 & & \\
& & 3a^{3} & +6a^{2} & & & & \color{red}{\leftarrow \small{ 3a^{2}(a+2) } } \\
& & -- & -- & & & & \color{red}{\leftarrow \small{ subtract } } \\
& & & 4a^{2} & +6a & -4 & & \\
& & & 4a^{2} & +8a & & & \color{red}{\leftarrow \small{4a(a+2) } }\\
& & & -- & -- & & & \color{red}{\leftarrow \small{ subtract }} \\
& & & & -2a & -4 & & \\
& & & & -2a & -4 & & \color{red}{\leftarrow \small{-2(a+2) } }\\
& & & & -- & -- & & \color{red}{\leftarrow \small{ subtract }} \\
& & & & & 0 & & \color{red}{\leftarrow \small{ Remainder } }
\end{array}$
$x=3a^{2} +4a-2$