I know this is a very simple example, and I guess the solution is something very easy, but I just can't quite understand what exactly should be done in the task and what approach should I take:

Is it something with co-factor expansion or just creating a simple augmented matrix and reducing it to ech.form ? Give me some clues, please.
Let $A=\begin{bmatrix} a & b\\c & d\end{bmatrix}$. Then your two conditions yield $$ \begin{bmatrix} a & b\\c & d\end{bmatrix}\begin{bmatrix}1\\ 2\end{bmatrix}=\begin{bmatrix}-1\\7\end{bmatrix}\implies \begin{align} a+2b&=-1\\ c+2d&=7\end{align} $$ and $$ \begin{bmatrix} a & b\\c & d\end{bmatrix}\begin{bmatrix}-1\\ 1\end{bmatrix}=\begin{bmatrix}-2\\-1\end{bmatrix}\implies \begin{align} -a+b&=-2\\ -c+d&=-1\end{align}. $$
Solve these 4 equations in the 4 unknowns to obtain $a=1$, $b=-1$, $c=3$, $d=2$.