Question about transition matrices Let $T: \mathbb{R}^3\to \mathbb{R}^3$ be a linear map defined as
$$T(x,y,z)=(-2x+y+z,y+2z,2x+z).$$
The matrix $A$ associated to $T$ with respect to the canonical basis is therefore
$$ \begin{pmatrix}
-2 & 1 & 1\\
0 & 1 & 2\\
2 & 0 & 1
\end{pmatrix}$$
I want to compute the matrix associated to $T$ with respect to the basis $B=\{(2,1,0),(1,1,0),(0,1,1)\}$.
Therefore I've computed the images $T(2,1,0)=(-3,1,4), T(1,1,0)=(-1,1,2), T(0,1,1)=(2,3,1)$.
Thus I need to find scalars $a,b,c$ (different for the 3 systems, but for sake of notation I use the same letters) such that
$$(-3,1,4)=a(2,1,0)+b(1,1,0)+c(0,1,1)\implies (a,b,c)=(0,-3,4)$$
$$(-1,1,2)=a(2,1,0)+b(1,1,0)+c(0,1,1)\implies (a,b,c)=(0,-1,2)$$
$$(2,3,1)=a(2,1,0)+b(1,1,0)+c(0,1,1)\implies (a,b,c)=(0,2,1)$$
The associated matrix therefore should be
$$ \begin{pmatrix}
0 & 0 & 0\\
-3 & -1 & 2\\
4 & 2 & 1
\end{pmatrix}$$
and this looks a bit suspicious (ok, it's  not wrong in principle to have a row equal to 0 for a linear map, but I picked this basis quite randomly): also, I don't see why we should end up like this.
Moreover, if I compute the matrix as $M_B^B=M_B^CM_C^CM_B^C$, where $C$ is the canonical basis, I otbain:
$$
\begin{pmatrix}
-7 & 10 & -6 \\
-2 & 4 & 0 \\
2 & -2 & 3 \\
\end{pmatrix} 
$$
where $M_B^C$ is equal to
$$\begin{pmatrix}
2 & 1 & 0\\
1 & 1 & 1\\
0 & 0 & 1
\end{pmatrix}
$$
I apologize in advance for the question: I know this forum isn't meant to solve homeworks (and I swear this isn't, I'm a master student in mathematics and I was trying to see how much I remember of linear algebra), but here I don't know if there's some logical mistake I'm doing (the computations look fine, I've repeated them 2 times). Any help would be much appreciated, thanks in advance!

Your first matrix is correct. Your second approach is theoretically correct, but it seems to me that what you have actually computed was$$M_B^C\begin{bmatrix}-2&1&1\\0&1&2\\2&0&1\end{bmatrix}M_C^B,$$since this is equal to the matrix that you got.
