Given a linear transformation on $\mathbb{R^3}$ as follows: $$\phi(x)=(x,a)a$$ where $(x,a)$ stands for the dot product of the vectors $x$ and $a$ ,and $a=(1,2,3)$. Find the matrix of this transformation on the basis $e_1=(1,0,0),e_2=(0,1,0),e_3=(0,0,1)$, which all the vectors above are given on, and also find the matrix on the basis $b_1=(1,0,1),b_2=(2,0,-1),b_3=(1,1,0)$.
I have already found the matrix on the basis $e_1,e_2,e_3$: $$A=\begin{bmatrix} 1 &2 &3 \\ 2 &4 & 6 \\ 3 & 6 & 9 \end{bmatrix}$$ Also, the matrix that maps the first basis to the second: $$C=\begin{bmatrix} 1 &2 &1 \\ 0 &0 & 1 \\ 1 & -1 & 0 \end{bmatrix}$$ On the new basis $a=(\cfrac{5}{3},-\cfrac{4}{3},2)$. I have done some trials to find the matrix $B$ (the second matrix asked in the question) but none matches with the answer of the book, while $A$ seems to be correct.
The answer is $$B=\begin{bmatrix} 20/3 &-5/3 &5 \\ -16/3 &4/3 & -4 \\ 8 & -2 & 6 \end{bmatrix}$$ Any help is appreciated.