Running drill

Starting at the same time on opposite baselines of a basketball court, Dr. Hong and Leo cross back and forth for 35 seconds without stopping. Dr. Hong needs 5 second to cross court, while Leo needs 7 seconds. What is the number of times during the 35 seconds that the Dr. Hong passes Leo going in the same or opposite direction?

----------------------

A similar problem was given in Assignment 1 of Charlotte Math Meetup:

Starting at the same time on opposite shores of a lake, two boats cross back and forth for 35 minutes without stopping. One boat needs 5 minutes to cross the lake. The other boat needs 7 minutes. What is the number of times during the 35 minutes that the faster boat passes the slower boat going in the same or opposite direction?