Question 930764
For A and B to arrive together at the starting point,
each of them must have completed an integer number of turns.
The time (in seconds) required for that must be a multiple of {{{224}}} and of {{{364}}} .
{{{224=2^5*7}}} and {{{364=2^2*7*13}}} , so
the minimum common multiple of {{{224}}} and {{{364}}} is
{{{2912=2^5*7*13}}} .
That means that A and B first arrive together at the starting point {{{2912}}} seconds after the start.
During that time, A will have run {{{2912/224=13}}} laps,
and {{{B}}} will have run {{{2912/364=8}}} laps.
Each time the distance A has run exceeds the distance B has run by an integer (1, 2, 3, or 4 laps), A is passing B.
When both have run for {{{2912seconds}}}, A has run {{{13-8=5}}} more laps than B, and they are both arriving together at the starting point.
I do not count that time as A passing B,
because they both stop running at that point,
so A passes B {{{highlight(4times)}}} .


A MORE DYNAMIC VIEW (in case you do not visualize it yet):
During their run, A is running at a speed of {{{1/224}}}{{{tracks/second}}} ,
while B is running at a speed of {{{1/364}}}{{{tracks/second}}} .
The difference in the distance they have both covered increases at a rate of
{{{1/224-1/364=13/2912-8/2912=5/2912}}}{{{tracks/second}}} ,
which means {{{5tracks/"2912 seconds"}}} .
A will be passing B for the first time when he has run {{{1track}}} more than B,
which will take {{{(1track)*(2912seconds/"5 tracks")=2912/5}}}{{{seconds=582.4seconds}}} .
When they meet at the starting point, after {{{2912seconds}}} , A will have run
{{{(2912seconds)*(5tracks/"2912 seconds")=5tracks}}} more than B, 
meaning that A will pass B {{{highlight(4times)}}} during the {{{2912seconds}}} they both run before meeting again