Eliminating c first is easiest:
• adding equations 1 and 2 together gives
(4g + 12f - c) + (10g - 14f + c) = 40 + (-74)
14g - 2f = -34
[7g - f = -17]
• adding equations 1 and 3 together gives
(4g + 12f - c) + (12g + c) = 40 + (-36)
16g + 12f = 4
[4g + 3f = 1]
Multiply the first equation wrapped in [] above by 3, then add it to the other one. This eliminates f :
3 (7g - f ) + (4g + 3f ) = 3 (-17) + 1
(21g - 3f ) + (4g + 3f ) = -51 + 1
25g = -50
Solve for g :
g = -2
Plug this into the first equation in [] and solve for f :
7 (-2) - f = -17
-14 - f = -17
f = 3
Plug these both into any of the original 3 equations. The third one has no f term, so that's simplest. Solve for c :
12 (-2) + c = -36
-24 + c = -36
c = -12