The goal is to make a *useable* web-based application that reports correct information, or indicates if there is no 'solution' to a query.
You will need to ask the starting station-A:
"how to I get from station-A to the destination station-B,
leaving after time-T ?"
Your query should be made directly to the server of station-A, and need to provide station-B and time-T (the inputs).
If station-A is directly connected to station-B, station-A can get the answer from its own timetable, and immediately reply with:
"catch bus-N from station-A, at time HH:MM, to arrive at station-B at time
XX:YY"
If station-A is not directly connected to station-B, it will have to ask each of its neighbours for help. As the route will require a transfer from the first bus to a second bus (to a third bus....) the output will need to inform the traveller, as with:
"catch bus-N from station-A, at time HH:MM, to arrive at station-C at time XX:YY.
catch bus-P from station-C, at time RR:SS, to arrive at station-B at time JJ:KK"
If no journey can reach the destination station by midnight, then the the output should be:
"there is journey from station-A to station-B leaving after time-T today"
The output does not have to aesthetically pleasing, or in fluent English, just to correctly report station names, and times, in the order to be taken.