How to find the coordinate vector x with respect to the basis B for R^3? 
Find the coordinate vector of $x = \begin{bmatrix}-5\\-2\\0\end{bmatrix}$ with respect to the basis $B = \{ \begin{bmatrix}1\\5\\2\end{bmatrix}, \begin{bmatrix}0\\1\\-4\end{bmatrix}, \begin{bmatrix}0\\0\\1\end{bmatrix} \}$ for $\mathbb{R}^3 $
$[x]_B = ?$

So I think I have an idea, but i'm not quite sure.. Should I just put this in matrix form and then put it in RREF form?
 A: Hint:
You are searching three coordinates $[x]_B=[x,y,z]^T$ such that:
$$
x [1,5,2]^T+y[0,1,-4]^T+z[0,0,1]^T=[-5,-2,0]^T
$$
this means:
$$
\begin{cases}
x=-5\\
5x+y=-2\\
2x-4y+z=0
\end{cases}
$$
A: The aim of the exercise is to find real numbers $\lambda_1,\lambda_2,\lambda_3$ such that
$$\begin{bmatrix}-5\\-2\\0\end{bmatrix}=\lambda_1 \begin{bmatrix}1\\5\\2\end{bmatrix}+\lambda_2 \begin{bmatrix}0\\1\\-4\end{bmatrix}+\lambda_3 \begin{bmatrix}0\\0\\1\end{bmatrix} $$
Now the task is quite easy, isn't it? Simply compare the coefficients of both sides of the equality, starting with $\lambda_1$, then $\lambda_2$ and lastly $\lambda_3$.
You vector in the new basis will then be given by
$$ \begin{bmatrix}\lambda_1\\\lambda_2\\ \lambda_3\end{bmatrix}.$$
As this is equivalent to saying that
$$\begin{bmatrix}-5\\-2\\0\end{bmatrix}=\underbrace{\begin{bmatrix}1& 0 & 0\\5 & 1 & 0\\2& -4 & 1\end{bmatrix}}_{:=T}\begin{bmatrix}\lambda_1\\\lambda_2\\ \lambda_3\end{bmatrix}. $$
You could as well find the inverse of the matrix $T$ and then you obtain
$$\begin{bmatrix}\lambda_1\\\lambda_2\\ \lambda_3\end{bmatrix}=T^{-1}\begin{bmatrix}-5\\-2\\0\end{bmatrix}.$$
A: Basically I found that you need to just Put the Basis B matrices together with the vector x at the end and you get $[x]_B = \begin{bmatrix}-5\\23\\102\end{bmatrix}$
