c=36+g
c:g:s=5:2:1
The ratio gives us two equations so that's three equations in three unknowns. Actually we're after the total t; let's put that in to solve for directly.
c:g:s:t = 5 : 2 : 1 : 5+2+1
We turn the ratio to fraction equations. s has the one; let's write everything in terms of s.
c/s = 5/1, g/s = 2/1, t/s = 8/1
Clearing the fractions,
c = 5s, g = 2s, t = 8s
Our other equation is
c = 36 + g
Substituting in for c and g,
5s = 36 + 2s
Solving,
3s = 36
s = 12
That's right; let's just get the total t.
t = 8s = 72
Answer: 72