Here is a different method. Let $A$ be the looked for matrix.
First of all, let us determine the intersection of the "initial" axes and of the "final" axes. It is rather easy to find that the first two axes intersect at $(14/9,35/9)$ and the second pair of axes at $(15,9)$.
Therefore, $(15,9,1)$ is the image of $(14/9,35/9,1)$ by $A$.
Besides, directing vectors of the initial axes are
$$\binom{2}{5} \ \ \text{and} \ \ \binom{1}{1}$$
and directing vectors of the final axis are:
$$s\binom{2}{1} \ \ \text{and} \ \ t\binom{1}{1}$$
(parameters $s$ and $t$ are there in order to take into account the change of scale)
With all these informations, we can say that
$$A : \begin{pmatrix}2\\5\\0\end{pmatrix} \to \begin{pmatrix}2s\\1s\\0\end{pmatrix}, \ \begin{pmatrix}1\\1\\0\end{pmatrix} \to \begin{pmatrix}1t\\1t\\0\end{pmatrix}, \ \begin{pmatrix}14/9\\35/9\\1\end{pmatrix}\to
\begin{pmatrix}15\\9\\1\end{pmatrix} $$
Otherwise said :
$$A \times \underbrace{\begin{pmatrix}2&1&14/9\\5&1&35/9\\0&0&1\end{pmatrix}}_{\begin{array}{c}\text{initial affine frame}\\B\end{array}} = \underbrace{\begin{pmatrix}2s&1t&15\\1s&1t&9\\0&0&1\end{pmatrix}}_{\begin{array}{c}\text{final affine frame}\\C\end{array}} $$
which is equivalent to :
$$A=C \times B^{-1} = \dfrac{1}{3}\begin{pmatrix}5t-2s&2s-2t&45-14s/3\\
5t-s&s-2t& 27-7s/3\\
0& 0& 3\end{pmatrix}\tag{1}$$
Now, the last step is expressing that
$$A\begin{pmatrix}1\\-2\\1\end{pmatrix}=\begin{pmatrix}0\\10\\1\end{pmatrix}$$
which yields a system of two equations in two unknowns $s$ and $t$, finally giving :
$$s=9 \ \ \text{and} \ \ t=17/3$$
that have to be plugged into (1) to give the final answer:
$$A=\begin{pmatrix} 31/9&20/9&1\\ 58/9&-7/9& 2\\0&0&1\end{pmatrix}$$
Remark: the interest of this method is that all the computations can be done using a Computer Algebra System ; here is what I have done with Matlab:
syms x1 x2 s t
[X1,X2]=solve(10*x1-4*x2==0,...
3*x1-3*x2==-7,...
x1,x2)
B=[2, 1, X1;
5, 1, X2;
0, 0, 1];
[X1,X2]=solve(x1-2*x2==-3,...
x1 -x2==6,...
x1,x2)
C=[2*s, t, X1 ;
s, t, X2;
0, 0, 1];
A=C*inv(B);
[S,T]=solve(A*[1,-2,1]'==[0,10,1]',s,t);
subs(A,{s,t},{S,T})