PV= NRT where "P" is the pressure, "V" is the volume, "N" is the number of atoms or molecules, "R" is the "gas constant" (

https://en.wikipedia.org/wiki/Gas_constant), and "T" is the temperature in Kelvins. In your problem you do not mention volume or temperature so I presume those are held constant. The only variables are P and N.

Writing $\displaystyle P_1$ and $\displaystyle N_1$ for the first, 24 Mpa, case and $\displaystyle P_2$ and $\displaystyle N_2$ for the second, 29 Mpa, case, we have $\displaystyle P_1V= N_1RT$ and $\displaystyle P_2V= N_2RT$. Dividing the first by the second, $\displaystyle \frac{P_1}{P_2}=\frac{N_1}{N_2}$.