We’re trying to figure out when you should jump off of a streetcar to arrive as soon as possible. The distance you need to run is equal to the square root of the sum of the square of the distance of your destination to the streetcar track and that of the streetcar track before the shortest run. The former is simply 1 million square metres. Let the second be x squared. The distance is then defined by √(1,000,000+x2). The point to jump off is thus when the derivative of this is equal to 5/15, or 1/3. This relationship is shown by the equations below and is true when x is 250√2. The equation gives 750√2 at that point, so divide that by 5 m/s to see how long you run for. Our answer is 150√2, or 212.1, seconds of running.
\frac d{dx}\sqrt{x^2+1\,000\,000}=\frac13\\[8pt] \frac d{dx}\sqrt{x^2+1\,000\,000}=\frac x{\sqrt{x^2+1\,000\,000}}\\[8pt] \frac x{\sqrt{x^2+1\,000\,000}}=\frac13\\[8pt] x=250\sqrt2