Looks to me like this happened on a branch line, not a "main line".
In that case, there may have been no actual track circuits or "automatic block signals" that would have warned the crew of the oncoming train.
Branches and "secondary" tracks like this would be operated with "manual block" rules (train dispatcher issues you a piece of paper that gives you authority to operate), and speeds would be somewhat limited (say, 30-40mph at most, if that much).
It looks like the kid broke the lock on the switch and opened it -- diverting the train into an industrial siding. The engineer may have been able to see that the switch target was "on the red" (normally would be green for lined for the main), and then "dumped it" (put the train into emergency).
At, say, 30mph, it's still going to take some distance to get stopped, especially with a few cars behind.
Perp should be charged as an adult and spend a good long time in jail.
Otherwise, it could instigate more incidents like this.