At STP, also known as standard temperature and pressure, 1 mole of a gas occupies 22.4 L. Since we are given with the volume of 6.3L, we calculate the amount of gas in mol.
n = (6.3L)/ (22.4L/mol) = 0.28125 mol
We are given with the mass of 6.7 g. Therefore, the molar mass or molecular weight of the gas is equal to,
6.7g/0.28125 mol = 23.82 g/mol