For what values of $a$ is the vector $(a ^ 2, a, 1)$ in $\langle (1,2,3), (1,1,1), (0,1,2) \rangle$? For what values of $a$ is the vector $(a ^ 2, a, 1)$ in $\langle (1,2,3), (1,1,1), (0,1,2) \rangle$?
My question is, should I find scalars $ \alpha, \beta, \gamma $ such that $ \alpha (1,2,3) + \beta (1,1,1) + \gamma (0,1,2) = (a ^ 2, a, 1) $?
How can I prove that a vector is in the generator set?
Could you give me an idea?

$ \alpha (1,2,3) + \beta (1,1,1) + \gamma (0,1,2) = (a ^ 2, a, 1) $
this becomes the following system of equations:
$\alpha + \beta  +0 \gamma=a^2$
$2\alpha + \beta  + \gamma=a$
$3\alpha + \beta  +2 \gamma=1$
Solving by gauss elimination:
First write the system in augmented matrix form
$
\begin{bmatrix}
1 & 1 & 0 & a^2\\
2 & 1 & 1 & a  \\
3 & 1 & 2 & 1       
\end{bmatrix}$
$r_2 \to r_2-2r_1$ and  $r_3 \to r_3-3r_1$
$
\begin{bmatrix}
1 & 1 & 0 & a^2\\
0 & -1 & 1 & a-2a^2  \\
0 & -2 & 2 & 1-3a^2       
\end{bmatrix}$
$r_2 \to -r_2$
$
\begin{bmatrix}
1 & 1 & 0 & a^2\\
0 & 1 & -1 & 2a^2-a  \\
0 & -2 & 2 & 1-3a^2       
\end{bmatrix}$
$r_1 \to r_1-r_2$ and  $r_3 \to r_3+2r_2$
$
\begin{bmatrix}
1 & 0 & 1 & a-a^2\\
0 & 1 & -1 & 2a^2-a  \\
0 & 0 & 0 & a^2-2a+1       
\end{bmatrix}$
$a^2-2a+1$ should equal zero to have infinite solutions or there is no  solutions
so
$a^2-2a+1=0 \to (a-1)^2=0  \to a=1$
after substituting $a=1$ the matrix become:
$
\begin{bmatrix}
1 & 0 & 1 & 0\\
0 & 1 & -1 & 1  \\
0 & 0 & 0 & 0       
\end{bmatrix}$
$\alpha+\gamma=0$
$\beta-\gamma=1$
$\gamma=t  \to  \alpha=-t$ and $\beta=1+t $
$ t \in \mathbb{R}$
