Gases push! They push outward upon the walls of the container that contains them. And this pushing is the result of collisions. Each collision of a gas particle on a container wall contributes to an overall amount of force on the wall. By definition, the pressure is the total force divided by the area of the container walls. So to maximize pressure, this ratio of force per area would have to be maximized. The larger the ratio ... the larger the pressure.
So exactly how can this ratio of force per area be maximized. Of the two components of the pressure ratio, the area is easiest to explain. Making the area as small as possible makes the pressure as large as possible.
The force component of this ratio is more difficult to explain. But to keep it simple, the pressure is maximized if the overall and total forcefulness of the collisions of gas particles with container walls is increased. The forcefulness of the collisions can be increased by collisions that ...
- occur at greater speeds.
- involve more massive particles (assuming the same or greater speed).
- involve more particles doing the colliding rather than less particles.
- occur more frequently (either because there are more particles or the particle speed is faster and they can traverse the distance from wall to wall in less time).
In this question, all variables (particle speed, container wall areas, and number of particles) are the same for the two containers with the exception of the particle mass. The pressure will be greater for more massive particles (assuming the same particle speed). A collision of a more massive particle with a container wall will be a more forceful collision.
In case you were wondering (... or objecting), the condition described for the two containers in this question is possible. The conditions is that one container has more massive particles than the other container but those particles move at the same speed. This is possible provided that the two containers are at different temperatures. For two different gas particles at the same temperature, the more massive particles would have the slower speed. But that's not the case in this question, so we can presume that the temperature of Container A and Container B are different.