This is just algebra, isn't it? Let be A's time for a kilometer and be B's time for a kilometer. Then the first condition is:

The second condition is:

So the solution is , , i.e. A takes 125 seconds to run a kilometer and B takes 150 seconds to run a kilometer.

- Hollywood