(b) Let the distance between X and Y be x km.
Then, the speed of A is
Time taken by the trains to cross each other
= Time taken to cover (100 + 120) m at 5 m/sec
Therefore the distance between the trains at 7 a.m
Thus, both of them meet at 7 : 56 a.m.