Charles’ Law
All gases expand at the same rate when heated. The volume of a fixed mass of gas is proportional to its temperature when kept at a constant pressure.
for constant p
Think about it…
If pressure is constant that means that the same number of collisions with the box are taking place. So if the box was made bigger the ball would have to move faster to make sure there were the same amount of collisions per unit time.