Find the affine transformation that maps the points O(0,0)…
Find the affine transformation that maps the points $O(0,0)$, $A(1,0)$, $B(0,1)$ to $1^\circ$ $O'(1,-2)$, $A'(3,-1)$, $B'(0,1)$; $2^\circ$ $O'(0,0)$, $A'(1,-5)$, $B'(5,1)$.
Explanation of Method
An affine map of the plane is determined by the images of three non-collinear points.
Step 1: General form
\[ x'=a_{11}x+a_{12}y+b_1,\qquad y'=a_{21}x+a_{22}y+b_2,\qquad a_{11}a_{22}-a_{12}a_{21}\ne0. \]
The image of $O$ gives $(b_1,b_2)$. The images of $A$ and $B$ then give the columns $(a_{11},a_{21})=A'-O'$ and $(a_{12},a_{22})=B'-O'$.
Step 2: $1^\circ$
$O'=(1,-2)$, $A'-O'=(2,1)$, $B'-O'=(-1,3)$: \[x'=2x-y+1,\qquad y'=x+3y-2,\qquad \Delta=\begin{vmatrix}2&-1\\1&3\end{vmatrix}=7\ne0\]
Areas are multiplied by $7$ and the orientation is kept.
Step 3: $2^\circ$
$O'=O$, $A'-O'=(1,-5)$, $B'-O'=(5,1)$: \[x'=x+5y,\qquad y'=-5x+y,\qquad \Delta=26\]
Since the matrix is $\begin{pmatrix}1&5\\-5&1\end{pmatrix}=\sqrt{26}\begin{pmatrix}\cos\alpha&\sin\alpha\\-\sin\alpha&\cos\alpha\end{pmatrix}$ with $\tan\alpha=5$, this is a rotation through $-\alpha\approx-78.7^\circ$ combined with a dilation by $\sqrt{26}$. It is a similarity.
Result
\[\boxed{\,x'=2x-y+1,\qquad y'=x+3y-2,\qquad \Delta=\begin{vmatrix}2&-1\\1&3\end{vmatrix}=7\ne0\,}\]
\[\boxed{\,x'=x+5y,\qquad y'=-5x+y,\qquad \Delta=26\,}\]