The chemical formula for methane is #"CH"_4#. This means that in one mole of methane, there is one mole of carbon and four moles of hydrogen.
The molar mass of methane is #"16.043 g/mol"#, which means that one mole of methane has a mass of #"16.043 g"#.
The molar mass of carbon is #"12.011 g/mol"#, which means that one mole of methane contains #"12.011 g C"#.
In order to determine the mass of carbon in #"72.0 g CH"_4"#, multiply the given mass of methane by the inverse of its molar mass to get moles #"C"#, then multiply by the molar mass of carbon in methane to get mass of #"C"#.
#72.0color(red)cancel(color(black)("g CH"_4))xx(1color(red)cancel(color(black)("mol CH"_4)))/(16.043color(red)cancel(color(black)("g CH"_4)))xx(12.011"g C")/(1color(red)cancel(color(black)("mol CH"_4)))="53.9 g C"#
In order to determine the mass of hydrogen in #"72.0 g CH"_4"#, subtract the mass of carbon from the given mass of methane.
#"72.0 g CH"_4-"53.9 g C"="18.1 g H"#