3. Two travelers set off from places A and B towards each other. Each of them, upon reaching one place, returns back to their starting place. The first time they meet is $8 \mathrm{~km}$ from place A, and the second time, when they are returning, $6 \mathrm{~km}$ from place B. Determine the distance between places A and B.
3. Let $x$ be the distance between places A and B. Let $v_{1}$ and $v_{2}$ be the speeds of the travelers starting from A and B, respectively. Let $t_{1}$ be the time elapsed until the first meeting. Then we have $v_{1} \cdot t_{1}=8, v_{2} \cdot t_{1}=x-8$ or $t_{1}=\frac{8}{v_{1}}, t_{1}=\frac{x-8}{v_{2}}$ so $\frac{8}{v_{1}}=\frac{x-8}{v_{2}}$ or $\frac{v_{2}}{v_{1}}=\frac{x-8}{8}$.

Let $t_{2}$ be the time elapsed until the second meeting. Then we have

$$
\begin{aligned}
& v_{1} \cdot t_{2}=x-2, v_{2} \cdot t_{2}=x+2 \text { or } t_{2}=\frac{x-2}{v_{1}}, t_{2}=\frac{x+2}{v_{2}} \text { so } \frac{x-2}{v_{1}}=\frac{x+2}{v_{2}} \text { or } \\
& \frac{v_{2}}{v_{1}}=\frac{x+2}{x-2}
\end{aligned}
$$

It follows that $\frac{x-8}{8}=\frac{x+2}{x-2}$

$$
\begin{aligned}
& x^{2}-8 x-2 x+16=8 x+16 \\
& x^{2}-18 x=0 \\
& x(x-18)=0 \\
& x_{1}=0, x_{2}=18
\end{aligned}
$$

The first solution is obviously impossible, so the distance between places A and B is 18 km.