Hm... interesting little problem if a current was also included...

Well, anyway, the time Grant takes to cover x is given by:

The time Grant takes to cover the distance on the ground, y, is given by:

The distance y is given by:

The total time is:

This all give:

Differentiate with respect to x.

Equate this to zero:

Square both sides, solve for x and you should get 25.92724... = 26 m