Given is a linear mapping and a basis. Determine the transformation matrix 
Given is $f: \mathbb{R}^{3} \rightarrow \mathbb{R}^{3}$ with
  $f:(x,y,z) \rightarrow (x+2y+z, y+z, -x+3y+4z)$. Determine the
  transformation matrix in terms of the basis $B= \left\{\begin{pmatrix}
1\\  0\\  0 \end{pmatrix}, \begin{pmatrix} 0\\  1\\  1
\end{pmatrix},\begin{pmatrix}
-1\\  0\\  1 \end{pmatrix}\right\}$

$f(\begin{pmatrix}
1\\ 
0\\ 
0
\end{pmatrix})= \begin{pmatrix}
1\\ 
0\\ 
-1
\end{pmatrix}= 0 \cdot \begin{pmatrix}
1\\ 
0\\ 
0
\end{pmatrix} + 0 \cdot \begin{pmatrix}
0\\ 
1\\ 
1
\end{pmatrix}- 1 \cdot \begin{pmatrix}
-1\\ 
0\\ 
1
\end{pmatrix}$
$f(\begin{pmatrix}
0\\ 
1\\ 
1
\end{pmatrix})= \begin{pmatrix}
3\\ 
2\\ 
7
\end{pmatrix}= 8 \cdot \begin{pmatrix}
1\\ 
0\\ 
0
\end{pmatrix} + 2 \cdot \begin{pmatrix}
0\\ 
1\\ 
1
\end{pmatrix}+5 \cdot \begin{pmatrix}
-1\\ 
0\\ 
1
\end{pmatrix}$
$f(\begin{pmatrix}
-1\\ 
0\\ 
1
\end{pmatrix})= \begin{pmatrix}
0\\ 
1\\ 
5
\end{pmatrix}= 4 \cdot \begin{pmatrix}
1\\ 
0\\ 
0
\end{pmatrix} + 1 \cdot \begin{pmatrix}
0\\ 
1\\ 
1
\end{pmatrix}+ 4 \cdot \begin{pmatrix}
-1\\ 
0\\ 
1
\end{pmatrix}$
I'm not sure how to read the transformation matrix now. Either I will read it correctly or I will accidentally read its transposition :s
$T=\begin{pmatrix}
 0  & 8  & 4\\ 
 0  & 2  & 1\\ 
-1  & 5  & 4 
\end{pmatrix}$
Did I do it all correctly? If it's alright, there are maybe faster ways doing this?

Perhaps a more straightforward way of computing the matrix is by using the relation
\begin{equation} [T]_\mathcal{B} = P^{-1} T P, \end{equation}
where $[T]_\mathcal{B}$ is the matrix that you computed,
$$P = (b_1\quad b_2\quad  b_3) = \begin{pmatrix} 1 & 0 & -1 \\ 
0 & 1 & 0 \\ 0 & 1 & 1\end{pmatrix}, $$
and $$T = \begin{pmatrix} f(e_1) & f(e_2) & f(e_3) \end{pmatrix}
= \begin{pmatrix}1 & 2 & 1\\ 0 & 1 & 1 \\ -1 & 3 & 4 \end{pmatrix},$$
where $e_1, e_2, e_3$ are the standard basis vectors. With this approach, all you have to do is invert $P$, which is easy, and then multiply the matrices. (check to see that it yields the same result!)
Heres a nice diagram that illustrates why the relation is true, from
 Linear Algebra Basis Trick.

