Answer
a. (from left to right) 3, 0, 1, and 1. The molecular formula of octinoxate is $C_{18}H_{26}O_{3}$.
b. (from left to right) 1, 0, 0, and 3. The molecular formula of is $C_{20}H_{22}O_{3}$.
Work Step by Step
Carbon atoms can have up to 4 bonds. To know the number of hydrogen atoms present around a carbon atom, all you have to do is count the number of bonds carbon has to another atom (e.g. carbon and oxygen) and subtract it from 4. Always keep it in mind that double bonds are considered as 2 bonds and triple bonds are 3 bonds. For the molecular formula, you just have to count the number of carbon, hydrogen and oxygen atoms.