Transformation matrix - Two ways to calculate? I need to undersatand what is the difference between my calculation and class calculation.
Suppose I have a matrix A:
And I need to change its base to be the following:  
So I used this formula and got was the right answer,:

But in calss we have seen a different way which I do not undersatand why both of them brings the same result, this is the other way, and how she actually calculate it

 A: Call your basis vectors $\{b_1,b_2,b_3,b_4\}$. The point is that for each $b_i$, we can write $Ab_i$ as a sum of the other basis vectors with some scalar coefficients $c_{ij}$. This looks like:
$$ \begin{array}{c}
Ab_1 = c_{11}b_1+c_{21}b_2+c_{31}b_3+c_{41}b_4 \\
Ab_2 = c_{12}b_1+c_{22}b_2+c_{32}b_3+c_{42}b_4 \\
Ab_3 = c_{13}b_1+c_{23}b_2+c_{33}b_3+c_{43}b_4 \\
Ab_4 = c_{14}b_1+c_{24}b_2+c_{34}b_3+c_{44}b_4
\end{array} \tag{I}$$
If $C$ is the matrix which represents how $A$ acts with respect to the basis $B$, then this means
$$ C = 
\begin{bmatrix} 
c_{11} & c_{12} & c_{13} & c_{14} \\
c_{21} & c_{22} & c_{23} & c_{24} \\
c_{31} & c_{32} & c_{33} & c_{34} \\
c_{41} & c_{42} & c_{43} & c_{44} 
\end{bmatrix} \tag{II}$$
For instance, the first line of $(\mathrm I)$ says that
$$ C \begin{bmatrix} 1 \\ 0 \\ 0 \\ 0 \end{bmatrix} =
\begin{bmatrix} c_{11} \\ c_{21} \\ c_{31} \\ c_{41} \end{bmatrix} \tag{III} $$
What your teacher did in class is find the row coefficients in $(\mathrm I)$ and write them as column vectors, then combined them all into the matrix $C$. On the other hand, we can rewrite $(\mathrm I)$ to look like this:
$$ A 
\begin{bmatrix} | & | & | & | \\ b_1 & b_2 & b_3 & b_4 \\ | & | & | & | \end{bmatrix} =
\begin{bmatrix} | & | & | & | \\ b_1 & b_2 & b_3 & b_4 \\ | & | & | & | \end{bmatrix}
\begin{bmatrix} 
c_{11} & c_{12} & c_{13} & c_{14} \\
c_{21} & c_{22} & c_{23} & c_{24} \\
c_{31} & c_{32} & c_{33} & c_{34} \\
c_{41} & c_{42} & c_{43} & c_{44} 
\end{bmatrix} $$
The vertical bars signify we are using the $b_i$s for columns. If we write $B$ as the matrix we get using the $b_i$s as columns, we can simply write $AB=BC$. Note when we multiply $AB$ on the left, we apply the matrix $A$ to each column of $B$. Multiply out the matrices on the right to see how this really is just equation $(\mathrm I)$!
But $AB=BC$ means we can calculate $C=B^{-1}AB$, which is the formula you used.
