Short answer: Both trains would be at the same spot when they meet therefore they are both equally close to Knox.
To know the point where they actually meet here is the math below.
Train from Knox ======> TK
Train from Bronx =====> TB
Distance travelled by TK after 3 hours = 120*3 = 360 Km
Now the point where both TK and TB meet is easily found out by adding the velocity of TB to TK and calculating the time taken to cover the current distance
Current distance between TB and TK = 5000 - 360 = 4640
Time taken for that to happen after the initial 3 hours of travel for TK is 4640/(120+180) = 15.4667 Hours = 15 Hours 28 Minutes.
Distance travelled by TK in 15 hours and 28 minutes = 120*15+120*28/60 = 1800 + 56 = 1856 Km
Therefore TK is 1856 + 360 = 2216 Km away from Knox
In that time TB has travelled 5000 -2216 = 2784 Km or 180*15 + 180*28/60 = 2700 + 84 = 2784 Km