There are two racers $A$ and $B$.
- speed of A: $1$ nodes/sec
- Speed of B: $2$ nodes/sec
Both of them race in a circular track as shown.
After how many seconds will the two racers meet again? How to derive a mathematical expression for the same?
I was trying using LCM but did not get a generalized expression for different speed and nodes.

Let $n$ be the number of seconds commenced. Then $A$ will be on the spot labeled $n \mod8$ and $B$ will be on the spit labeled $2n\mod8$. Then we want to find all values of $n$ such that $n\equiv 2n \mod 8$. This reduces to $7n\equiv0\mod8$. But $ \gcd(7,8)=1$ and therefore $n\equiv0\mod 8$, i.e. $n=8k$ for all natural numbers $k$.