I've came across with very cool problem.
Consider some land with rectangle shape $H$ by $L$ ( height, length ) Length is also given, just forgot to show it on a picture.
Now we are in left top corner and want to travel to right bottom corner. We can move on grass with time $T_1$ per unit, but in the water with time $T_2$ per unit. Now we want to minimize the time we need to spend by traveling.
I started to try to do this task and I found out that function which represents this... walk(?) is unimodal.
But I'm not so sure.
How can we construct function and search for minimum of it?