Let $a=(1,2,-1),b=(1,1,1),c=(1,3,\lambda)$ are given vectors. Find $\lambda$ such that the given vectors form a basis for in $\mathbb{R^3}$. For each found $\lambda$ represent a vector $v=(1,1,2)$ in that basis.
Augmented matrix of $a,b,c$ is:
$$ \left[\begin{array}{ccc|c} 1 & 2 & -1 & 0\\ 1 & 1 & 1 & 0\\ 1 & 3 & \lambda & 0 \\ \end{array}\right]\Rightarrow rref=\left[\begin{array}{ccc|c} 1 & 0 & 0 & 0\\ 0 & 1 & 0 & 0\\ 0 & 0 & \lambda+3 & 0 \\ \end{array}\right],\lambda\neq -3$$
$\forall \lambda\in\mathbb{R},\lambda\neq -3$ vectors $a,b,c$ form a basis in $\mathbb{R^3}$.
I am not sure that this is correct because using $\lambda$ we solve a system for representing a vector $v$.
When looking for a basis made out of the vectors $a,b,c$ we're looking at linear combinations of $a,b,c$, i.e. $k_1a+k_2b+k_2c$, or $k_1\begin{bmatrix}1\\2\\-1\end{bmatrix} +k_2\begin{bmatrix}1\\1\\1\end{bmatrix} +k_3\begin{bmatrix}1\\3\\\lambda\end{bmatrix} $, or $\begin{bmatrix}1&1&1\\2&1&3\\-1&1&\lambda\end{bmatrix}\begin{bmatrix}k_1\\k_2\\k_3\end{bmatrix}$. You have the vectors going across instead of down in your matrix.
One approach is to solve $\begin{bmatrix}1&1&1\\2&1&3\\-1&1&\lambda\end{bmatrix}\begin{bmatrix}k_1\\k_2\\k_3\end{bmatrix} = \begin{bmatrix}x\\y\\z\end{bmatrix}$. You'll get $k_1,k_2,k_3$ in terms of $x,y,z$ and $\lambda$. Then you can plug in $x=1,y=1,z=2$ to find the $k_1,k_2,k_3$ in terms of $\lambda$ which give you a linear combination of $a,b,c$ that equals $\begin{bmatrix}1\\1\\2\end{bmatrix}$.