A bug walks on the surface of a box ($L=B=1$, $H=2$), starting at a corner, $A$. You want to feed the bug but you also want the bug to walk the longest distance. The bug takes the shortest path possible. Where do you put the food to make it walk the longest?
The box floats in the air and the bug can walk on any face of box it wants. Hint: its not $B$ Refer the image


The longest distance cannot lie on any of the pink sides:
After all, the greatest distance here is $\sqrt{5}$, and the shortest distance to $B$ is $\sqrt{10}$ over the pink then to the "top," but $\sqrt{8}$ on only the sides.
By symmetry, for any point on the top white rectangle, there is an equivalent point on the bottom white rectangle, so if some longest-distance point occurs on one, it must occur on the other.
Thus we need only consider points on one of these white rectangles (say, the bottom, now yellow).
The distance to the furthest point on the yellow rectangle is of course to the point $B$, which is $\sqrt{8}$. So we can eliminate the yellow rectangle.
The "farthest point" must lie on the top square (now green). It must be a point farther than to $B$....
Consider some red point on the top face, at coordinates $(x,y)$ measured with respect to $B$, where $\{ x,y \} \leq 1$. The "straight" distance to it (from $A$) is $d = \sqrt{(3-x)^2 + (1-y)^2}$. The distance "around the back" is illustrated by the dashed line:
This is the same distance as the "straight" distance to the blue point, noting that the yellow square is rotated $90^\circ$ with respect to the green one.
So now one plugs in the formula for total distance and optimizes over $x$ and $y$.