18. Robot A and Robot B start from points $A$ and $B$ respectively at the same time and in the same direction. When Robot A reaches point $B$, Robot B has walked 288 meters. When Robot A catches up with Robot B, Robot B has walked 336 meters. The distance between points $A$ and $B$ is $\qquad$ meters.