There are an infinite number of possible answers. We want to find a vector
$\colvector{x \\ y \\ z}$ so that the set
\begin{align*}
S = \set{
\begin{bmatrix} 1 \\ 3 \\ 1 \end{bmatrix},
\begin{bmatrix} 2 \\ 0 \\ 1 \end{bmatrix},
\begin{bmatrix} x \\ y \\ z \end{bmatrix}
}
\end{align*}
is a linearly independent set. We need a vector not in the span of the first two columns, which geometrically means that we need it to not be in the same plane as the first two columns of $A$. We can choose any values we want for $x$ and $y$, and then choose a value of $z$ that makes the three vectors independent.
I will (arbitrarily) choose $x = 1$, $y = 1$. Then, we have
\begin{align*}
A = \begin{bmatrix}
1 & 2 & 1\\
3 & 0 & 1 \\
1 & 1 & z
\end{bmatrix}
&\rref
\begin{bmatrix}
\leading{1} & 0 & 2z-1
\\ 0 & \leading{1} & 1-z
\\ 0 & 0 & 4 - 6z
\end{bmatrix}
\end{align*}
which is invertible if and only if $4-6z \ne 0$. Thus, we can choose any value as long as $z \ne \frac{2}{3}$, so we choose $z = 0$, and we have found a matrix
$A = \begin{bmatrix} 1 & 2 & 1\\ 3 & 0 & 1 \\ 1 & 1 & 0 \end{bmatrix}$ that is invertible.