Basis Transformation Matrix I have a problem related to transformation matrix. 
The problem is like that;
Given basis $B$: $b_1 = \begin{pmatrix}1&2\end{pmatrix}^T$ and $b_2 =\begin{pmatrix}2&1\end{pmatrix}^T$ and $A$: $a_1=\begin{pmatrix}1&2\end{pmatrix}^T$, $a_2=\begin{pmatrix}2&7\end{pmatrix}^T$.
Find the transformation matrix $T$ from the basis $B$ into basis $A$?
I would appreciate if anyone help me with this.

The solution by provided by @NDewolf. Let's fill out the details.

Vectors will be colored according to the basis membership, and named based upon color:
$$
 \color{blue}{\mathbf{B}\ (standard)}, \qquad
 \color{red}{\mathbf{R}\ (a)}, \qquad
 \color{green}{\mathbf{G}\ (b)}.
$$

$$
\mathbf{T}_{\color{red}{R}\to \color{blue}{B}}=
\color{black}{\left[
\begin{array}{r|r}
 1 & 2 \\
 2 & 7 \\
\end{array}
\right]}
$$

The matrix $\mathbf{T}_{\color{red}{B}\to \color{blue}{A}}$ is an operator which maps a $\color{blue}{blue}$ vector to a $\color{red}{red}$ vector.
The inverse matrix is a map which connects vectors in the $\color{blue}{standard}$ basis to vectors in the $\color{red}{\mathbf{R}}$ basis:
$$
\mathbf{T}^{-1}_{\color{blue}{B}\to \color{red}{R}} =
%
\color{blue}{
\frac{1}{3}
\left(
\begin{array}{rr}
 7 & -2 \\
 -2 & 1 \\
\end{array}
\right)}
$$

For the green basis $\color{green}{\mathbf{G}}$, the maps are
$$
\mathbf{G}_{\color{green}{G}\to \color{blue}{A}}=
\color{black}{\left[
\begin{array}{r|r}
 1 & 2 \\
 2 & 1 \\
\end{array}
\right]}, \qquad
%
\mathbf{G}^{-1}_{\color{blue}{A}\to \color{green}{G}}=
\color{black}{\left[
\begin{array}{rr}
 -1 &  2 \\
  2 & -1 \\
\end{array}
\right]}
$$

Transition from red $\color{red}{\mathbf{R}\ (a)}$ to green $\color{green}{\mathbf{G}\ (b)}$
As so succinctly expressed by @Bernard, connect all bases through the hub of the blue basis, $\color{blue}{standard}$. Start with a vector in the $\color{red}{\mathbf{R}}$ basis, map that to a vector in the $\color{blue}{standard}$ basis, then map that to a vector in the $\color{green}{\mathbf{G}}$ basis:
$$
\color{red}{
\left[
\begin{array}{c}
 x_{1} \\
 y_{1} \\
\end{array}
\right]}
%
\quad \Longrightarrow \quad
%
\color{blue}{
\left[
\begin{array}{c}
 x_{2} \\
 y_{2} \\
\end{array}
\right]}
%
\quad \Longrightarrow \quad
%
\color{green}{
\left[
\begin{array}{c}
 x_{3} \\
 y_{3} \\
\end{array}
\right]}
%
$$
The solution is
$$
\begin{align}
  T_{\color{red}{R}\to\color{green}{G}} &= \color{green}{G^{-1}} \color{red}{R} \\
& =
\left[
\begin{array}{rr}
 -1 & 2 \\
 2 & -1 \\
\end{array}
\right]
%
\left[
\begin{array}{cc}
  1 & 2 \\
  2 & 7 \\
\end{array}
\right] \\
%
&=
\left[
\begin{array}{cr}
 1 & 4 \\
 0 & -1 \\
\end{array}
\right]
\end{align}
$$
