From point $A$, a passenger train travels towards $B$ at a speed of $30 \mathrm{~km}$ per hour. A fast train, also departing from $A$ but later, travels at a speed of $60 \mathrm{~km}$ per hour and catches up with the passenger train in $B$ under normal conditions. The passenger train, after covering ${ }^{2} / 3$ of its journey, is forced to continue at half its original speed due to a technical failure, which results in the fast train catching up $27^{1} / 9 \mathrm{~km}$ before $B$. What is the distance between $A$ and $B$?