allabout, Can you please explain the formula used??
Why exactly sqrt of the respective times, don't know. But here's another fast way, if you feel reluctant with the formula.
1) the ratio of the respective speeds is X+4 : X+1 or 1 : X+1/X+4
2) g has made 240*X km's at time X; m takes 4 hours to cover the distance already traveled by g: 240X/4
So the ratio of speed and distance is
240 : 240X/4 : 1 : X+1/X+4, or, because you have to make the units equally
1 : X/4 : 1 : X+1/X+4
Solve for X
XÂ² + 4X = 4X + 4
X = +- 2, -2 is out because there is no negative time