A and B are two ideal gases. \(3\) g-mole of gas A at absolute temperature \(T_1\) and \(5\) g-mole of gas B at absolute temperature \(T_2\) have been mixed. There is no loss of energy in the process. Find the temperature of the mixture if \(T_1=300\) K and \(T_2=500\) K.