I’ll use the example in your comment: $M=\pmatrix{4&2&1\\0&1&3}$, with respect to the bases $$\beta=\{v_1=[1,0,0],v_2=[1,1,0],v_3=[1,1,1]\}$$ and $$\beta\,'=\{w_1=[1,0],w_2=[1,1]\}\;.$$
This transformation takes as input a column vector $$v=\pmatrix{\alpha_1\\\alpha_2\\\alpha_3}$$
representing the linear combination $\alpha_1v_1+\alpha_2v_2+\alpha_3v_3$ of basis vectors in $\beta$ and produces as output the product
$$Mv=\pmatrix{4&2&1\\0&1&3}\pmatrix{\alpha_1\\\alpha_2\\\alpha_3}=\pmatrix{4\alpha_1+2\alpha_2+\alpha_3\\\alpha_2+3\alpha_3}\;.$$
The entries $4\alpha_1+2\alpha_2+\alpha_3$ and $\alpha_2+3\alpha_3$ are then to be interpreted as coefficients of the vectors $w_1$ and $w_2$ in $\beta\,'$:
$$T(v)=(4\alpha_1+2\alpha_2+\alpha_3)w_1+(\alpha_2+3\alpha_3)w_2\;.$$
If you want to know what this looks like in terms of the standard basis $\{[1,0],[0,1]\}$, just multiply out:
$$\begin{align*}
T(v)&=(4\alpha_1+2\alpha_2+\alpha_3)\pmatrix{1\\0}+(\alpha_2+3\alpha_3)\pmatrix{1\\1}\\
&=\pmatrix{4\alpha_1+3\alpha_2+4\alpha_3\\\alpha_2+3\alpha_3}\;.
\end{align*}$$
Note that this is exactly what you get from the product
$$AMv=\pmatrix{1&1\\0&1}\pmatrix{4&2&1\\0&1&3}\pmatrix{\alpha_1\\\alpha_2\\\alpha_3}\;,$$
where $A=\pmatrix{1&1\\0&1}$ is a change-of-basis matrix: it translates a representation in terms of $\beta\,'$ into one in terms of the standard basis. It’s easy to construct this change-of-basis matrix: its columns are just the representations of $w_1$ and $w_2$ in terms of the standard basis.
It follows that if you start with $v$, representing a vector in $\Bbb R^3$ in terms of the basis $\beta$, and multiply it by the matrix $$AM=\pmatrix{4&3&4\\0&1&3}\;,$$ you get $T(v)$ expressed in terms of the standard basis for $\Bbb R^2$. Perhaps, though, you want to be able to input $v$ in terms of the standard basis for $\Bbb R^3$. Then you need another change-of-basis matrix, this time to convert from the standard basis for $\Bbb R^3$ to the basis $\beta$. We already know how to go the other way: to transform from a representation in terms of $\beta$ to one standard coordinates, multiply by the matrix $$B=\pmatrix{1&1&1\\0&1&1\\0&0&1}$$ whose columns are the representations of $w_1,w_2$, and $w_3$ in terms of the standard basis. (In other words, do exactly what we did to get $A$.) If you take the vector $\alpha_1v_1+\alpha_2v_2+\alpha_3v_3$, represented by the matrix $$v=\pmatrix{\alpha_1\\\alpha_2\\\alpha_3}$$ in terms of the basis $\beta$, you can find its representation in terms of the standard basis by multiplying by $B$ to get $$Bv=\pmatrix{1&1&1\\0&1&1\\0&0&1}\pmatrix{\alpha_1\\\alpha_2\\\alpha_3}=\pmatrix{\alpha_1+\alpha_2+\alpha_3\\\alpha_2+\alpha_3\\\alpha_3}\;.$$
Unfortunately, this isn’t quite what we need: we want to start with a vector $v$ in standard coordinates and convert it to one in $\beta$ coordinates so that we can multiply by $AM$ and get $T(v)$ in standard coordinates. That requires changing base from standard to $\beta$; multiplying by $B$ goes in the opposite direction, from $\beta$ coordinates to standard ones. As you might expect, the matrix that does the change of basis in the other direction is $B^{-1}$, which I’ll let you compute for yourself. Once you have it, you can express $T$ in terms of a matrix multiplication that involves standard coordinates on both ends:
$$T(v)=AMB^{-1}v$$
gives $T(v)$ in standard $\Bbb R^2$ coordinates if $v$ is expressed in standard $\Bbb R^3$ coordinates.
Best Answer
It is not true that $T(e_i)$ is a vector in $\mathbb{R}^3$. Since the codomain of $T$ is $\mathbb{R}^4$, it should be a vector in $\mathbb{R}^4$.
For convenience, let $u_1=[0,-3,-2]^T$, $u_2=[1,-4,-2]^T$, and $u_3=[-3,4,1]^T$. For example, to determine $T(e_1)$, we first want to determine the linear combination of $e_1$ as $u_1,u_2,u_3$, i.e., solve the linear system $$ c_1\cdot\begin{bmatrix} 0 \\ -3 \\ -2 \end{bmatrix}+c_2\cdot\begin{bmatrix} 1 \\ -3 \\ -2 \end{bmatrix}+c_3\cdot\begin{bmatrix} -3 \\ 4 \\ 1 \end{bmatrix}=\begin{bmatrix} 1 \\ 0 \\ 0 \end{bmatrix}. $$ After you find $c_1,c_2,c_3$, you can write $$T(e_1)=T(c_1u_1+c_2u_2+c_3u_3)=c_1T(u_1)+c_2T(u_2)+c_3T(u_3)=\cdots$$ Apply similar arguments on $e_2$ and $e_3$. Then the standard matrix $[T]$ (I assume it is the matrix representation of $T$ w.r.t. standard basis on both sides.) should be $$[T]=\begin{bmatrix} T(e_1) & T(e_2) & T(e_3) \end{bmatrix}.$$ Nevertheless, do not forget to check $u_1$, $u_2$, and $u_3$ are linearly independent first, or they do not constitute a basis for $\mathbb{R}^3$.
Of course there are some more convenient formulas, but I believe we should start with elementary approaches first.