The ideal gas law (PV = nRT) relates pressure (P), volume (V), moles of gas (n), and temperature (T). (R) represent the ideal gas constant: 0.08206 (L*atm/mol*K). With three of the four properties listed, you can solve for the fourth.
You are given the volume (20 L) and temperature (25 C ≈ 298 K) directly. You are given the moles of gas indirectly (40 grams). You must convert the mass of gas into moles using the gas' molar mass in (g/mol).
Now we will rearrange the ideal gas law to solve for pressure: (P = nRT/V). This gives you the pressure of the gas in atm, which you can convert into other units as required (torr, bar, mmHg, etc.)