Person A and Person B start from locations $A$ and $B$ respectively at the same time, moving towards each other at uniform speeds. They first meet at a point 8 kilometers away from $A$. After meeting, they continue to move forward, reach the other's starting point, and immediately return. They meet again at a point 6 kilometers away from $A$. The distance between $A$ and $B$ is $\qquad$ kilometers.