How to calculate basis knowing only coordinates? I am working on this exercise our teacher gave us:

So basically I am given nine coordinates in one base and nine in another and I should then figure out a matrix used to convert $e$ coordinates into $\tilde{e}$ coordinates? In my book there is this guide to solving problems like this I think.

Trying this, I got the change-of-basis matrix to be:
\begin{bmatrix}
13\quad & -7\quad & 37\\
-2\quad & 1\quad & -6\\
6\quad & -3\quad & 17
\end{bmatrix}
Am I thinking straight? There was another exercise similar to this that I used this exact method for, but the teacher said I was way off and I asked him why and he gave me an answer that I honestly did not understand nor didn't help me solve the problem and because of covid it would probably take at least a week, probably two weeks to get an answer to a question :( and I do not have that time. How do I solve these kind of problems and what is going on here?
 A: This is straightforward.
What's going on is that an invertible matrix can always be interpreted as the change of basis between the standard basis and the basis consisting of the columns.
So, you should get $\begin{pmatrix}1&1&-1\\1&3&2\\-2&-1&3\end{pmatrix}\begin{pmatrix}-1&1&1\\0&-1&0\\-3&2&2\end{pmatrix}^{-1}=\begin{pmatrix}-1&-2&0\\8&-1&-3\\5&4&-1\end{pmatrix}$.
Your basis is the set of columns of the last matrix.
The method you referenced will work, but you need to apply it twice, with the standard basis as a point of reference, and multiply the two transition matrices as I have done.
I just remember the fact I mentioned about the columns, which saves time.  This may seem like a lot of hot air, but the method you referred to doesn't give the product in the right order, when you try to do it all at once.
A: I suggested plotting on a comment to get a "feel" for what these matrices are doing, as well as the contravariant nature of the coefficients in a change of basis (as the basis vectors lengthen, the components of a given vector expressed in the new basis shrink). The answer by Chris Custer (+1) is the answer to the question, but to dispel the remaining questions I am going to look at one of the original vectors in standard Euclidean coordinates in terms of the new basis vectors, and use the matrix in Chris' answer as my translator to make sure that the order of matrix operations does make sense.
I chose the vector $\vec v=\small\begin{bmatrix}1\\3\\-1\end{bmatrix},$ just because I like it. This vector, in standard Euclidean coordinates is $\vec v= 1 \vec e_1 + 3 \vec e_2 -1 \vec e_3=\small 1\begin{bmatrix}1\\0\\0\end{bmatrix}+ 3 \begin{bmatrix}0\\1\\0\end{bmatrix}-1 \begin{bmatrix}0\\0\\1\end{bmatrix}.$ Nothing new. Here it is:

Now, this very same arrow, exactly as it is, can be looked at using the new basis vectors as calculated with the standard operation in Chris' answer:
$$\small\left\{\tilde {\vec e_1}=\begin{bmatrix}-1\\8\\5\end{bmatrix},\tilde {\vec e_2}=\begin{bmatrix}-2\\-1\\4\end{bmatrix}, \tilde {\vec e_3}=\begin{bmatrix}0\\-3\\-1\end{bmatrix} \right\}$$
The equation used in that answer is:
$$\mathbf C = \begin{bmatrix}\text{vectors}\\\text{in}\\ \text{old basis}\end{bmatrix}\; \begin{bmatrix}\text{vectors}\\\text{in}\\ \text{new basis}\end{bmatrix}^{-1}=\small\begin{bmatrix}-1&-2&0\\8&-1&-3\\5&4&-1\end{bmatrix}$$
where $\mathbf C$ is the matrix containing the new basis in its columns.
It follows that
$$\begin{bmatrix}\text{vectors}\\\text{in}\\ \text{old basis}\end{bmatrix} = \mathbf C  \begin{bmatrix}\text{vectors}\\\text{in}\\ \text{new basis}\end{bmatrix}$$
And since we are focusing on the second vector $\vec v,$ the operation will only involve the second vector in the new coordinate system, which is in the second column of the vectors expressed in the new basis: $\small \begin{bmatrix}-1&\color{red}1&1\\0&\color{red}{-1}&0\\-3&\color{red}2&2\end{bmatrix}$ as such:
$$\small \begin{bmatrix}1\\3\\-1\end{bmatrix}= \mathbf C\small \begin{bmatrix}1\\-1\\2\end{bmatrix}=\small\begin{bmatrix}-1&-2&0\\8&-1&-3\\5&4&-1\end{bmatrix}\small \begin{bmatrix}1\\-1\\2\end{bmatrix}$$
which is indeed what we get if we plot the equivalent expression:
$$\small \begin{bmatrix}1\\3\\-1\end{bmatrix}= 1\small \begin{bmatrix}-1\\8\\5\end{bmatrix} -1 \small \begin{bmatrix}-2\\-1\\4\end{bmatrix}+2 \small \begin{bmatrix}0\\-3\\-1\end{bmatrix}  =1\tilde {\vec e_1}-1\tilde {\vec e_2}+ 2 \tilde {\vec e_3}$$
as

And now closing the loop and transforming forward the coordinates from old to new, we can see why we need the inverse of the actual change of coordinates matrix $\mathbf C$:
$$ \begin{bmatrix}\text{vectors}\\\text{in}\\ \text{new basis}\end{bmatrix}= \mathbf C^{-1} \begin{bmatrix}\text{vectors}\\\text{in}\\ \text{old basis}\end{bmatrix}$$
So
$$\small \begin{bmatrix}1&-2&0\\8&-1&-3\\5&4&-1\end{bmatrix}^{-1}\big[\vec v\big]_\text{Std. Eucl.}=
\small \begin{bmatrix}13&-2&6\\-7&1&-3\\37&-6&17\end{bmatrix}\small \begin{bmatrix}1\\3\\-1\end{bmatrix}=\begin{bmatrix}1\\-1\\2\end{bmatrix}_{\text{New basis}}$$
