$A$ walks $30 \mathrm{~km}$ per day from $P$ to $Q$. After walking $72 \mathrm{~km}$, $B$ starts from $Q$ towards $P$ on the same road, and walks $\frac{1}{10}$ of the entire distance each day. After $B$ has walked for as many days as the $\frac{1}{8}$ of the distance he walks per day, he meets $A$. What is the distance between $P$ and $Q$?