Linear Transformation change of basis. Let $V=\mathbb R^3$ and $T\in A(V)$, for all $a_i\in A(V)$, be defined by $$T(a_1,a_2,a_3) =(2a_1+5a_2+a_3, −3a_1+a_2−a_3, a_1+2a_2+3a_3).$$ What is the matrix $T$ relative to the basis $$v_1=(1,0,1),\quad  v_2=(−1,2,1),\quad  v_3=(3,−1,1)?$$
This is the question.
Here I think that one can arrive at the answer by forming a matrix of $v_1,v_2,v_3$ and then multiply it by the matrix formed by inserting the standard basis vectors in the transformation and then multiply it by the inverse of the $v_1,v_2,v_3$ matrix.
Is this the correct approach.
$$\begin{pmatrix}1&-1&3\\0&2&-1\\1&1&1\end{pmatrix}^{-1} \begin{pmatrix}2&5&1\\-3&1&-1\\1&2&3\end{pmatrix}  \begin{pmatrix}1&-1&3\\0&2&-1\\1&1&1\end{pmatrix}$$
My Approach
 A: Suppose that $T\colon V\to V$ is a linear transformation. You are correct as pointed out Anne. It is the following result:

If $T\colon V\to V$ is a linear transformation on a finite dimensional vector space and consider $B_1$ and $B_2$ be ordered basis for $V$. Suppose that $C$ is the change of coordinates matrix that change $B_2$ and $B_1$ coordinates. Then $[T]_{B_2}=C^{-1}[T]_{B_1}C$.

Proof.
$$C[T]_{B_2}=[I]_{B_2}[T]_{B_2}=[IT]_{B_2}=[TI ]_{B_2}=[T]_{B_1}[I]_{B_2}=[T]_{B_1}C.$$
Therefore,  $C[T]_{B_2}=[T]_{B_1}C$, or logically equivalent $$\boxed{[T]_{B_2}=C^{-1}[T]_{B_1}C}$$

Let's me give more details. In your case,  setting $\beta_1=\{e_1,e_2,e_3\}$ and $\beta_{2}=\{v_1,v_2,v_3\}$ then
$$[T]_{\beta_2}=\begin{bmatrix}1&-1&3\\0&2&-1\\1&1&1\end{bmatrix}^{-1} \begin{bmatrix}2&5&1\\-3&1&-1\\1&2&3\end{bmatrix}  \begin{bmatrix}1&-1&3\\0&2&-1\\1&1&1\end{bmatrix}$$
Alternatively, you can do it using directly the definition of $[T]_{\beta_2}$. Indeed,
$$[T]_{\beta_2}:=\begin{bmatrix}\vdots&\vdots&\vdots\\ [T(v_1)]_{\beta_2}&[T(v_2)]_{\beta_2}&[T(v_{3})]_{\beta_2}\\\vdots&\vdots&\vdots\end{bmatrix},$$
where $[T(v_i)]_{\beta_2}$ is the coordinates of the vector $T(v_i)$ respect to the ordered base $\beta_2$.
