Diatomic gases are gases that must be composed of two atoms of the particular gas such as H2 or N2. Therefore, the molar mass 38 g/mol is made up of 2 atoms, so the molar mass of one atoms would be 19 g/mol (38/2). Then when you look at a periodic table, the gas with a molar mass of approximately 19 g/mol is F, which is F2 because it is diatomic.
Hope this helps