I have matrix $\bf{A}$ of linear transformation $\mathcal{A}$ in the basis $\langle \mathbf{e}_1,\mathbf{e}_2\rangle$ and matrix $\bf{B}$ of linear transformation $\mathcal{B}$ in the basis $\langle\mathbf{f}_1,\mathbf{f}_2\rangle$ I have to find matrix of linear transformation: $$\mathcal{X}=\mathcal{A}+2B$$ in the basis $\mathbf{g}_1=\mathbf{f}_1+\mathbf{f}_2$ and $\mathbf{g}_2 = \mathbf{f}_1$
where:
$\mathbf{e}_1=(2,1) \quad \mathbf{e}_2=(-3,-2) \quad \mathbf{f}_1=(1,0) \quad \mathbf{f}_2=(-4,-1) \quad A=\begin{pmatrix}2&-3\\4&1 \end{pmatrix} \quad B=\begin{pmatrix}-1&0\\1&2 \end{pmatrix}$
where should I really start? I was thonking of applying basis transformation like this:
$$x_1\mathbf{e}_1+x_2\mathbf{e}_2 = y_1\mathbf{g}_1+y_2\mathbf{g}_2 \tag{1}$$ and therefore:
$$x_1\mathbf{e}_1+x_2\mathbf{e}_2 = y_1(\mathbf{f}_1+\mathbf{f}_2)+y_2\mathbf{f}_1$$
then maybe find coordinates of the known operators using:
$$C'=T^{-1}\cdot C\cdot T \tag{2}$$
transformation $\mathbf{e} \to \mathbf{g}$
$$x_1\mathbf{f}_1+x_2\mathbf{f}_2 = y_1(\mathbf{f}_1+\mathbf{f}_2)+y_2\mathbf{f}_1 \tag{3}$$
transformation $\mathbf{f} \to \mathbf{g}$
but I am stuck here, not sure if I am right at all and do not know how to proceed.
We define two new matrices: the matrix $R$ and the matrix $S$ by
$$Rg_k=e_k,\quad Sg_k=f_k,\quad k=1,2$$
The coefficients of these matrices can be calculated just observing how the matrix multiplication is done. Then the equation written in the basis $g_1,g_2$ becomes
$$X=R^{-1}AR+2S^{-1}BS$$
I will compute $R$ as an example for you: if $g_1=(-3,-1)$ and $g_2=(1,0)$ then
$$Rg_1=(2,1),\, Rg_2=(-3,-2)\implies R^1_1=-3,\, R^2_1=-2,\, R^1_2=7,\, R^2_2=5\\\implies R=\begin{bmatrix}-3&7\\-2&5\end{bmatrix}$$
That is, we solved this linear system of equations
$$Rg_1=\begin{bmatrix}R^1_1&R^1_2\\R^2_1&R^2_2\end{bmatrix}\begin{bmatrix}-3\\-1\end{bmatrix}=\begin{bmatrix}2\\1\end{bmatrix}=e_1,\qquad Rg_2=\begin{bmatrix}R^1_1&R^1_2\\R^2_1&R^2_2\end{bmatrix}\begin{bmatrix}1\\0\end{bmatrix}=\begin{bmatrix}-3\\-2\end{bmatrix}=e_2$$