Let the distance between A and B be \( D \).
- The relative speed of A and B when they are moving towards each other is \( 72 + x \) (where \( x \) is the speed of B).
- After crossing each other, the remaining distance is traveled at their individual speeds, i.e., \( \frac{D}{72 + x} \).
We are given the time taken by both after crossing each other, and the relationship gives us the equation:
\[
\text{Time taken by A} = \frac{D}{72}, \quad \text{Time taken by B} = \frac{D}{x}
\]
Using this relation, we can calculate the speed of B, which is 60 km/h.
Thus, the speed of B is 60 km/h.