When gases are mixed together in a closed container, the total pressure of the mixture can be calculated using Dalton's law of partial pressures. According to this law, the total pressure of the gas mixture is equal to the sum of the partial pressures of each individual gas.
In your case, if gas A has a pressure of 3 atm and gas B has a pressure of 5 atm, the total pressure (P_total) of the mixture can be calculated as follows:
\[ P_{\text{total}} = P_A + P_B \] \[ P_{\text{total}} = 3 , \text{atm} + 5 , \text{atm} = 8 , \text{atm} \]
Thus, the total pressure of the new gas mixture is 8 atm.