Let us first look at the trains: using non-relativistic mechanics we see that from one train's perspective the other train is moving in with a speed of 160+120=280km/h. Hence the distance to the other train (140km) with be covered in exactly 30min. The supervisor needs to run 6.3km at a speed of 14km/h, thus takes 6.3/14=0.45h=27min. Since 27<30, the supervisor can pull the switch before he sees the trains collide.

We only need to hope the switch is in the right place...

Addendum: when considering the relativistic case, in the frame of the switch, the switch will be pulled in 27min (same calculation).

In the frame of each train, the speed of the other train moving in, is slightly smaller than 280km/h (it is (120+160)/(1+120*160/c^2), where c^2 is the speed of light).

In the frame of a train the distance to be covered will be shortened by a factor γ (which is different for both trains), so for the train the collision happens a factor γ earlier than for the switch. However the clock in each trains is running slower than the clock in the switch, by the same factor γ. So a train sees the switch being pulled earlier by a factor γ than the switch sees it.

We conclude that both trains see the switch being pulled earlier than they "see" collision happen, in fact relativity will help avoid the collision.

PS: γ=1/sqrt(1-v^2/c^2), where v is the speed of the train and c the speed of light