Our Gemara quotes a baraita that presents the following situation:
A cow that damages a talit (clothing) and the talit damaged the cow, we do not say that the two damages cancel each other out, rather we must evaluate each damage separately and clarify how much one party owes to the other.
The simple reading of this case appears to be that in one single event the cow damaged the talit and at the same time, was injured by it. This explanation is difficult because the cow damaging the talit is a case of regel – where the animal damaged an object accidentally (e.g. by stepping on it) – which only applies if the animal entered the domain of the owner of the object, while the talit damaging the cow is a case of bor – literally a ditch, but applied to any obstacle left in the public thoroughfare – which only applies in the public domain. This problem leads Tosafot to suggest that the baraita is talking about two separate incidents. The Me’iri prefers to accept the simple reading of the baraita and explain that the damage done by the cow was not an accidental case of regel, but a situation where the cow damaged the talit on purpose, which would fall under the category of keren (goring) which applies in the public domain.
The Nimmuḳe Yosef explains the ruling that we cannot simply say that the two damages cancel out one another as a concern that two simultaneous damages may lead us to say that the damage that was done was roughly equivalent, and we would be inclined to assume that the value was close enough. The halakha demands that care must be taken to establish the true value of damage done by each side. The Rosh simply says that the bet din – the Jewish court – may have chosen to ignore the incident entirely, since both sides played a role in the damage. The baraita teaches that even in such cases the court must take the case seriously and become involved.