I think 9 would be the answer.
$\begin{bmatrix} a & b & c\\ p & q & r\\ s & t & u \end{bmatrix} * \begin{bmatrix} 0 &1 & 1\\ 1 & -1& 1\\ 0& 0& 1 \end{bmatrix} = \begin{bmatrix} -1 & 1& 1\\ 2 & 1& 1\\ 3 & -1& 12 \end{bmatrix}$
Let's call above equation $M * X = B$
We only want to solve for $a$, $q$ and $u$.
To find $q$ multiply 2nd row of M with first column of X to get $q = 2$.
To find $u$.
Third row * first column gives $t = 3$
Third row * second column gives $s - t = -1$. So $s = 2$.
Third row * third column gives $s + t + u = 12$. So $u = 7$.
To find $a$
First row * first column gives $b = -1$.
First row * second column gives $a - b = 1$. So $a = 0$.
Thus answer $7 + 2 = 9$.