Find 2 basis $M=\left\{v_1,v_2,v_3\right\}$ and $N=\left\{w_1,w_2,w_3\right\}$ such that $T_{MN(f)}$ 
$A=\begin{pmatrix} 1 & 3 & -1\\ 
-1 & 0 & -2\\  1 & 1 & 1 \end{pmatrix}$ is a real matrix and $f: \mathbb{R}^3 \rightarrow \mathbb{R}^3, \text{ } f(x)= A \cdot x$ is a
  linear mapping.
Find two basis $M= \left\{v_1,v_2,v_3\right\}$ and $N=
\left\{w_1,w_2,w_3\right\}$ of $\mathbb{R}^3$ such that $T_{MN}(f) =
\begin{pmatrix} 1 & 0 & 0\\  0 & 1 & 0\\  0 & 0 & 0 \end{pmatrix}$

I have absolutely no idea how to do this task, nor understand the notation $T_{MN}$. Maybe I could do it if I  would understand the notation. I hope some will explain me what it means / how this could be solved?
If it matters, $Ker(f)=\left\{\begin{pmatrix}
-2z\\ 
z\\ 
z
\end{pmatrix} \mid z \in \mathbb{R}\right\}$ and $Im(f)= span\left(\left\{\begin{pmatrix}
1\\ 
-1\\ 
1
\end{pmatrix},\begin{pmatrix}
0\\ 
-3\\ 
2
\end{pmatrix}\right\}\right)$
(This is no homework!)
I will set a bounty on this question of 200 rep because I really want understand it.

Does $T_{M,N}(g)$ mean "the matrix of the linear transformation $g$ w.r.t the bases $M$ (domain) and $N$ (range)? If so, proceed as in the proof of the Rank Nullity Theorem.
Choose a basis of $\ker f$: you tell me $v_3=(-2,1,1)^T$ will do. Complete to a basis of $\mathbb{R}^3$ in your favourite way: I use $v_1=(0,1,0)^T$, $v_2=(0,0,1)^T$. 
Now put $w_1=Av_1$, $w_2=Av_2$, and note that as in the proof of the Rank Nullity Theorem these are linearly independent. (You can work them out and check by hand.)  Now choose $w_3$ to be linearly independent of these. 
We are done.
