Moles of an ideal gas are : 0.288
Further explanation
In general, the gas equation can be written

where
P = pressure, atm
V = volume, liter
n = number of moles
R = gas constant = 0.082 l.atm / mol K
T = temperature, Kelvin
Volume=V=3 L
T = 45°C+273=318 K
P = 2.5 atm
