First establish that your going to measure using 1 mole So now you have 194.19g caffeine
Carbon is 49.48% of the mass so you have (49.48%)*(194.19)=96.0852 g carbon to see how many carbons you have you do (mass/Molar mass) (96.0852/12.0107) = 10 So you have 10 carbons
Do it for each one: Hydrogen: (5.19%)*(194.19) = 10.0785 g (mass/molar mass) (10.0785/1.00794) = 10
Nitrogen: (28.85%)(194.19) = 56.0238 g (56.0238/14.00674) = 4