First I want to ask if the example is OK in this task?
That is, I think numbers are correct, but it is possible to collide with others not only at the last possible moment.
For egzample you start at x=-25 and end at x=15, then going with speed 2sqrt(5) <5
you will collide with the first one at time=2,5 and with the second at time =7,5.
There is of course infinitely many other possibilities.
Example would be also OK if you decreased speed limit from 5 to 2.
Another question is if it is possible to end up at equal point with angles different from 0 and +-45 degrees?