To solve this problem, we have to use Dalton's Law about partial pressure.
[tex]P_{total}=P_{carbon}+P_{nitrogen}+P_{oxygen}[/tex]However, we have to use the following formula to find each pressure.
[tex]P_{\text{gas}}=x_1\cdot P_{Total}[/tex]Where x refers to the fraction molar relation between the moles of the whole container and the moles of each gas.
Let's apply the formula to each gas
[tex]\begin{gathered} P_{\text{carbon}}=\frac{4\text{mol}}{16\text{mol}}\cdot123kPa_{} \\ P_{\text{carbon}}=30.75kPa \\ P_{\text{nitrogen}}=\frac{5\text{mol}}{16\text{mol}}\cdot123\text{kPa} \\ P_{\text{nitrogen}}=38.44kPa \\ P_{\text{oxygen}}=\frac{3\text{mol}}{16\text{mol}}\cdot123\text{kPa}=23.06kPa \end{gathered}[/tex]