Define rules for the predicate
Your intuition is good. Because "nearby" is only defined with "connected", there could only be 1 station between them. However, it says that the stations are "not_too_far" if at most one station is between them. What about if no stations are between them? If 2 stations are "connected" they should be "not_too_far" as well. 

So it should be:

not_too_far(X,Y) :- connected(X,Y) ; nearby(X,Y).


Where ; denotes OR.