Using the Ideal Gas Law it is possible to find the number of moles of the gas present in a volume of 3L. This can be used to find the molecular mass.
The gas law gives P*V = n*R*T, where P is the pressure, V is the volume, n is the number of moles, R is the gas constant and T is the temperature.
The STP according to the IUPAC is a temperature of 273.15 K and a pressure of P = 100 kPa. The volume is 3L and R = 8.314 L*kPa/K*mol
This gives n = 100*3/(8.314*273.15)
=> n = 0.132
As 0.132 moles of the gas weighs 2 g, its molar mass is 2/0.132 = 15.15.
The molar mass of the gas is 15.15 g/mol.