The mathematical form of ideal gas law is PV=nRT
where P is pressure
V is volume
n is number of moles
R is universal gas constant
T is temperature in kelvin
According to the question, presaure, volume and number of moles are given and R remains constant for all gassses and hence the ideal gas law can be used to calculate the temperature of gas.