I much prefer the cleverness of @Donald's answer (which is probably the approach the exam writers hoped you'd see), but it's perhaps worth noting that you can attack this problem with a little algebraic brute force and a lot of perseverance.
You have three equations in three unknowns. Our goal is to eliminate two of the unknowns, leaving a single equation in, say, $a$. Notice that the first equation fairly readily allows us to express $b$ in terms of $a$; the third equation allow us to to do likewise for $c$:
$$\begin{align}
ab + 2 a + 2 b = 16 \quad\to\quad b(a+2) = 16-2a \quad\to\quad b &= \frac{16-2a}{a+2} = \frac{2(8-a)}{a+2} \tag{1a} \\[6pt]
c &= \frac{31-2a}{a+2} \tag{1b}
\end{align}$$
By substitution, the second equation transforms to involve $a$ alone:
$$\frac{2(8-a)}{a+2}\cdot\frac{31-2a}{a+2} + 2\left(\frac{16-2a}{a+2}+\frac{31-2a}{a+2}\right) = 24 \tag{2a}$$
$$\frac{(8-a)(31-2a)}{(a+2)^2}+ \frac{47-4a}{a+2} = 12 \tag{2b}$$
$$(8-a)(31-2a)+ (47-4a)(a+2) = 12 (a+2)^2 \tag{2c}$$
(It's around this point that you should start to suspect that there's a better way. Nevertheless, ...) We can expand everything and combine terms to get
$$14 a^2 + 56 a - 294 = 0 \quad\to\quad 14 ( a^2 + 4 a - 21)= 0 \quad\to\quad 14 (a+7)(a-3) = 0 \tag{3}$$
Here, we solve to find that $a=3$ (discarding $a=-7$ as extraneous). Then $b=2$ and $c=5$ follow from $(1a)$ and $(1b)$ above. $\square$
This approach lacks ingenuity, but it's essentially mechanical. (You could even opt to use the Quadratic Formula in $(3)$ instead of thinking-through the factorization. Simplifying the final result is something of a chore, but it doesn't require any insight.) So, even if you don't see the clever approach, there's still a way to proceed ... and to succeed.