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 [tex]P_1[/tex] and [tex]N_1[/tex] for the first, 24 Mpa, case and [tex]P_2[/tex] and [tex]N_2[/tex] for the second, 29 Mpa, case, we have [tex]P_1V= N_1RT[/tex] and [tex]P_2V= N_2RT[/tex]. Dividing the first by the second, [tex]\frac{P_1}{P_2}=\frac{N_1}{N_2}[/tex].