Methane #(CH_4)# has a molar mass of #16g"/"mol#. So, #32g# of methane will be #2# moles of it. Know that, hydrogen has a molar mass of around #1g"/"mol#. In methane, there are four hydrogen atoms, so the total mass of hydrogen is #4g"/"mol# in methane, which is #1/4# of the mass of methane.