The answer is: the mass of carbon is 420.6 grams.
m(C₈H₁₈) = 500 g; mass of octane.
M(C₈H₁₈) = 114.22 g/mol; molar mass of octane.
n(C₈H₁₈) = m(C₈H₁₈) ÷ M(C₈H₁₈).
n(C₈H₁₈) = 500 g ÷ 114.22 g/mol.
n(C₈H₁₈) = 4.38 mol; amount of octane.
In one molecule of octane, there are eight carbon atoms:
n(C) = 8 · n(C₈H₁₈).
n(C) = 8 · 4.38 mol.
n(C) = 35.02 mol; amount of carbon.
m(C) = 35.02 mol · 12.01 g/mol.
m(C) = 420.6 g; mass of carbone.