2. Let $n$ be the time in minutes it takes for the slower boy to complete a lap. Then $n>5, n \in \mathbb{N}$. The speed at which the faster boy catches up to the slower one is

$$
\frac{1}{5}-\frac{1}{n}=\frac{n-5}{5 n}\left(\frac{\text { lap }}{\text { min }}\right)
$$

therefore, the time between meetings is

$$
\left.\frac{5 n}{n-5}=\frac{5(n-5)+25}{n-5}=5+\frac{25}{n-5} \text { (min }\right)
$$

and since this is an integer, $(n-5)$ must divide 25. The natural divisors of $25$ are $1, 5,$ and $25$. Thus, $n=6$ or $n=10$ or $n=30$, which correspond to meeting times of 30 minutes, 10 minutes, and 6 minutes, respectively. Since the time between meetings is at least 12 minutes, the only value that satisfies the given condition is $n=6$.