a)

A(0,0) + a=(3,-1) so clearly

$a=\left(\begin{array}{c}3\\-1\end{array}\right)$

A(1,0) + (3,-1) = (4,-1)

A(1,0) = (1,0)

A(0,1) + (3,-1) = (3,-2)

A(0,1) = (0,-1)

$A =\left(\begin{array}{cc}1&0\\0 &-1\end{array}\right)$

b)

$t=\left(\begin{array}{c}0\\-1\end{array}\right)$

$r=\left(\begin{array}{cc}0 &1\\1 &0\end{array}\right)$

$f(x)=r(x-t)+t$