Hi. You did not submit the setups the question refers to. This makes it impossible for your question to be answered. However, I will try to help you as best I can.
Boyle's law can be applied to any system where the mass of a gas occupies a volume inversely proportional to the pressure of that gas. This is the definition of Boyle's Law that was created by the physicist Robert Boyle who aimed to study the relationship between temperature, pressure and volume of a gas.
An example of how this law can be applied can be seen when we blow a balloon with air. This is because the balloon and the blow establish a system at constant temperature. As we blow, the balloon becomes fuller with air and the molecules of that air become compressed and compacted as the balloon inflates. This increases the pressure of the gas inside the balloon, which starts pushing on the balloon walls, decreasing the volume.