Mishnah 6 in chapter 3 of tractate Bava Kamma continues with the same topic - two people who collide with each other. However, here we are dealing with a physical collision of the bodies themselves, two people bumping heads with each other, rather than a situation where their items collide.
The wording of the Mishnah and its three cases:
"Shenayim shehayu mehalechin birshut harabim" - both are walking about their business in the usual manner, do not see each other (such as at a blind corner), and collide - "sheneihem peturim" - both are exempt.
"Echad ratz ve'echad mehalekh" - one is running and one is walking - "vechavlu zeh bazeh" - and they injured each other - they are exempt.
"O shehayu sheneihem ratzim" - or both were running - "vechavlu zeh bazeh" - and they injured each other - they are exempt.
The reason for exemption when two are walking:
Each of the two has permission to walk in the public domain, and neither of them saw the other or acted irresponsibly. Since each of them can be blamed to the same degree that the other can be blamed, there is no liability here at all.
It is worth noting: If they did indeed see each other and nevertheless collided, the rule is that a person is always considered forewarned, and consequently, an obligation falls upon each to pay the other for the damages he caused.
When both are running:
Here too, the underlying assumption is that they did not see each other. A runner deviates from the normal rules of using the public domain, and therefore acted irresponsibly and should have been held liable for his actions. However, here both are running, and both are equally responsible for the irresponsible behavior that caused the damage. Since both caused this, we are again dealing with two people who collided with each other: if they did not see each other - both are exempt; and if they saw each other and nevertheless collided - a person is always considered forewarned, and each is obligated to pay for the other's damages, since both are partners to this. Although the Mishnah does not state this explicitly, this is how the Shulchan Aruch rules.
"Echad ratz ve'echad mehalekh" - the Gemara's difficulty:
The Gemara points out that the Mishnah cannot be taken literally: if one is walking, he has the right to walk there, and when the other bumps into him - it is the runner who acted irresponsibly, and he is certainly liable for the damages. Why, then, does the Mishnah exempt him? The Gemara explains that we are dealing with a very specific case: on Friday afternoon close to the onset of Shabbos, when it is permitted to run and a person is even expected to run, for Shabbos is arriving at any moment and he must complete the preparations.
We have a tradition that a person is expected to hurry at the last minute, and this can even be expected of him - something found in everyone's personal experience approaching Shabbos. Therefore, on Friday afternoon people run and it is even permitted for them to run, and this is a normal use of the public domain on Friday afternoon close to its onset. And since this is so, the runner is not acting irresponsibly, and if they did not see each other - he is exempt.
A dispute among the Rishonim and Poskim:
Some establish this allowance specifically for running in order to prepare for the mitzvos of Shabbos - running to organize the house, prepare the Kiddush cups, set the table, and the like, as all of these are included in the preparations for Shabbos and are categorized as a mitzvah.
The Rambam holds that even running that is not for a mitzvah at all - such as a person rushing to close a deal because everyone knows that Shabbos is approaching and he must finish it now - is considered a legitimate reason to run in the public domain close to Shabbos, and in such a case, he would be exempt.
The Shulchan Aruch cites both opinions, and therefore the matter is unresolved.
In any event, this allowance was stated specifically regarding Erev Shabbos, which is a time when rushing around is expected and accepted behavior. However, it is not valid regarding other mitzvos: a person rushing on a Tuesday afternoon to fulfill a great mitzvah, to a funeral or to a wedding, and collides with his friend - is completely liable, for he has no permission to run on a Tuesday afternoon, not even for the sake of a mitzvah. But on Erev Shabbos, everyone expects this and the allowance exists, and therefore if he did not see his friend and it was an accident - the runner is exempt.
In summary: In this Mishnah we learned three cases of two people who injured each other in the public domain - both are walking, one is running and one is walking, and both are running - and in all of them the halachah is "both are exempt" when they did not see each other: regarding walking, because both have permission to walk and one cannot be blamed more than the other; and regarding both running, because both are equally responsible for deviating from the normal manner of use. If they saw each other - a person is always considered forewarned and each pays for his fellow's damages. In the middle case, the Gemara established the Mishnah as taking place on Erev Shabbos close to its onset, when running is a normal and expected use of the public domain, and the poskim debate whether the allowance is limited to the needs of the mitzvos of Shabbos or applies even to other needs.