ok if you look at the first to equations carefully you will see that 2 things have changed between the 2. the "+c" is now "-c" and the "10" is now "3"
if we think about it you will see that c=7. well how do we know. when c or 7 was taken away from the problem it left you with 3
so that means a+b=3
we dont need to know what the exat value of a or b is.
so a+b +3c
(3) + 3(7)
3 + 21
24
a+b+3c=24