I remember this problem from school and I have mucked around with solutions.

The problem is: You are crossing a railway line that is x feet across, your speed is y, there is a train approaching at speed z. What is the optimal angle to cross the railway at to maximize the time available to cross?

Any ideas,

P.