Two cows stand nearby while a dog races past both of them.
A dog races past two cows.
From the statement that two cows stand nearby it is known that "both of them" refers to these cows, past which the dog races. So it can be said that the dog races past the two cows.
(-x)
(-x)