Part 1) Use this equation:
PV = nRT
where, P = pressure, V = Volume, n = moles of gas, R = ideal gas constant, T = Temperature (in degrees Kelvin)
Solve for n (how much gas is in the container)
n = PV/RT = (5 atm)(2.5 L)/(.082057)(298.15 K) = 0.51 moles of gas
note: I converted degrees Celsius to degrees kelvin by simply adding 273.15 to it.
notes: I used the ideal gas constant, R = .082057 L*atm/(mol*K) because it has the units of the other values in the question
Part 2) we must find the atomic mass to identify the element. We need g/mol.
40.5g/0.51moles = 79.4 g/mol (79 g/mol is our actual answer if we are paying attention to significant figures).
The element of Bromine has an atomic mass of 79.9 g/mol...this is the closest option.
3) I identified the gas in the container by dividing the known mass of my sample by the known amount of moles of my sample to obtain the atomic mass.