When temperature is constant (for o-level), when a fixed mass of gas (fixed number of air molecules) is compressed in a closed system (e.g. piston), the volume V decreases and pressure P increases, and vice versa.
But when you multiply pressure and volume, PV, it is always a constant.
PV = constant
Hence we can always equate the PV of the first scenario = to the PV of the second scenario, provided there is no addition or removal of air molecules from the system.
Hence, you have P1V1 = P2V2
The followings are 4 different questions which require this concept to solve. Do revise them.
Solutions: Option D (refer to the worked solutions below)
Solutions: Option D