Imagine that when two ants meet, they switch identities. So even after a collision, two ants are traveling in two opposite directions. It follows that 20 ants return to Peter while 50 ants reach Cynthia. To calculate the number of ant collisions, imagine that each ant carries a message. So Peter has sent 50 messages to Cynthia, one message per ant. Similarly, Cynthia has sent 20 messages to Peter, one message per ant. Further, imagine that the two ants swap messages when they collide. Then a message always makes forward progress. Each of Cynthia's messages goes through 50 ant collisions. Each of Peter's messages goes through 20 ant collisions. The total number of collisions is 50 times 20, which is 1000.