Answer
a) $x=9$
b) $x=6\sqrt 2$
Work Step by Step
We are given the sequence:
$$6,x,12,\dots$$
a) In order for the sequence to be arithmetic we must have constant difference between consecutive terms:
$$x-6=12-x.$$
Solve the equation for $x$:
$$\begin{align*}
2x&=12+6\\
2x&=18\\
x&=9.
\end{align*}$$
b) In order for the sequence to be geometric we must have constant ratio between consecutive terms:
$$\dfrac{x}{6}=\dfrac{12}{x}.$$
Solve the equation for $x$:
$$\begin{align*}
x^2&=12\cdot 6\\
x^2&=72\\
x&=\sqrt{72}=6\sqrt 2.
\end{align*}$$