Recall your d = rt, distance = rate * time.
if, the southbound train is going at a speed of say " r " mph, since we know that the northbound one is going faster by 4 miles, than is really going at " r + 4 " mph then.
now, we know in 2.5 hours, they're 330 miles from each other, thus the southbound train has been rolling for 2.5 hours, and the northbound train has also been rolling for 2.5 hours.
if the northbound train has covered on those 2.5 hours say " d " miles, then the southbound train has covered the slack, or " 330 - d ".

how fast is the northbound going? well, r + 4.