This is a cube with each side having a length of $l$ containing a certain amount of molecules in it.
Let's say a molecule of mass m is traveling in the $y$-direction with the velocity $v$ and hits the wall 1. Obviously, just before the molecule hits the wall 1, its momentum is $mv$. After hitting the wall 1, the direction of the molecule will be reversed, and its velocity and momentum will be $-v$ and $-mv$, respectively. So the change in momentum is $2mv$. So far, so good.
Now, let's say the time the molecule is in contact with the wall 1 is $t$. In other words, the wall 1 applies a certain force on the molecule for the time $t$, so to get the force the wall 1 exerts on the molecule, we simply divide the change in momentum $2mv$ by $t$.
However, this is not what is done in the proofs I have seen.
As the distance between wall 1 and wall 2 is $l$, and the velocity of the molecule is $v$, after hitting the wall 1, the time it takes for the molecule to travel back to the wall 2 and come back and hit the wall 1 again is, $t_1 = \frac{2l}{v}$.
And they calculate the force the wall 1 exerts on the molecule by dividing the change in momentum $2mv$ by $t_1$.
I do not understand it. Someone please help.