From the formula (C3H8) [please use capital letters for element symbols] we see that there are 3 C atoms for 8 H atoms. If we had 16 H atoms there would be 6 C atoms for example.
Thus is there are 3.84x10^24 H atoms.
a) then there are (3/8)x3.84x10^24 C atoms
b) there are a couple of ways to do this.
If the sample contains 3.84x10^24 H atoms and each molecule contains 8 H atoms then there are 3.84x10^24/8 molecules of propane. Each mole contains 6 x 10^23 molecules so there are
3.84x10^24/(8 x 6 x 10^23 )moles
the molar mass of propane is
(3x12)+(8x1) g mole^-1
hence find the mass as
mass= molar mass x number of moles