The molecular formula #"C"_9"H"_10"N"_2"#, indicates that in one mole of the compound, there are 9 moles of carbon atoms, 10 moles of hydrogen atoms, and 2 moles of nitrogen atoms.
To calculate the mass % of H atoms in #"C"_9"H"_10"N"_2"#, divide the molar mass of H atoms by the molar mass of the compound and multiply by 100.
Mass of #"C"_9"H"_10"N"_2":##"146.193 g/mol"# https://www.ncbi.nlm.nih.gov/pccompound?term=C9H10N2
Mass of #"H"# atoms: #(10xx1.008" g/mol")="10.08 g/mol"#
Divide and multiply by 100:
#(10.08color(red)cancel(color(black)("g")))/(146.193color(red)cancel(color(black)("g")))xx100="6.895% H"#