Temperature can be calculated using the average kinetic energy. The ideal gas equation is being related to the average molecular kinetic energy.
PV = nRT
PV = (2/3) N(0.5mv^2)
By substituting and simplifying, we eventually get the equation.
KE = (3/2)RT
T = 3866 x 2 / 8.3145 x 3 = 309.98 K or 36.83 degrees Celsius