bug on the box problem 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 two existing answers provide good intuition with their net diagrams and go a long way towards a solution, but they can be improved by combining them.

Oscar Lanzi&rsquo;s answer is wrong in that the golden path should travel along the face, as in David G. Stork&rsquo;s answer, not along the edge.

David G. Stork&rsquo;s answer is missing the symmetry argument from Oscar Lanzi&rsquo;s answer that reduces the number of coordinates to be optimized from $2$ to $1$.

Combining the two, we can consider a point on the diagonal of the opposite square face with coordinates $(x,x)$ measured from $B$. The path that uses one rectangular face has squared length

$$
(2+(1-x))^2+(1-x)^2=2x^2-8x+10\;,
$$

whereas the path that uses two rectangular faces has squared length

$$
(2+x)^2+(2-x)^2=2x^2+8\;.
$$

These are equal for $-8x+10=8$, that is, for $x=\frac14$. Their derivatives have opposite sign, so increasing one will decrease the other; thus this point $\frac14$ along the diagonal from $B$ towards the corner above $A$ is the point at maximal distance. The maximal distance is

$$
\sqrt{2\left(\frac 14\right)^2+8}=\frac{\sqrt{130}}4\approx2.850\;,
$$

compared to the distance $\sqrt8\approx2.828$ to $B$, a difference of less than one percent.

We can also find the minimal height of the box at which this phenomenon appears. Replacing $2$ by $h$ above, we have

$$
(h+(1-x))^2+(1-x)^2=2x^2-4x-2hx+(h+1)^2+1
$$

and

$$
(h+x)^2+(2-x)^2=2x^2-4x+2hx+h^2+4\;.
$$

These are equal for

$$
-2hx+(h+1)^2+1=2hx+h^2+4
$$

and thus

$$
x=\frac{h-1}{2h}\;.
$$

Thus, for $h\lt1$ there is no solution, so $B$ is the point at maximal distance. For $h=1$, the two paths to $B$ have the same length, which makes sense, since in this case they are related by symmetry. For $h\gt1$ the point $D$ at equal distance along the two paths is on the diagonal of the square face, and as $h\to\infty$ it goes to the centre of the square face, which also makes sense, since in this limit the distance on the rectangular faces is $h$ no matter where you enter the square face. For $h\ge1$ the distance to $D$ is 

$$
\sqrt{2\left(\frac{h-1}{2h}\right)^2-4\left(\frac{h-1}{2h}\right)+2h\left(\frac{h-1}{2h}\right)+h^2+4}=\sqrt{\frac{\left(h^2+1\right)\left(2h^2+2h+1\right)}{2h^2}}\;.
$$

Interestingly, this distance is less than the distance $\sqrt{h^2+4}$ to $B$ for $h\lt h^*=\frac{3+\sqrt{17}}4\approx1.781$ and only becomes the maximal distance as $h$ increases beyond $h^*$. This is possible because for $h\lt2$ the angle between the path $AB$ and the face diagonal $BC$ is acute after unfolding, so that a displacement of the food from $B$ along the face diagonal initially shortens the path. (Thanks to Oscar Lanzi for pointing this out.) At $h=h^*$ the triangle formed by the unfolded paths from $A$ to $B$ and to $D$ and the face diagonal is isosceles, and beyond that the distance to $D$ is greater than the distance to $B$ even though the angle at $B$ remains acute up to $h=2$.

The largest relative difference between the maximal distance and the distance to $B$ occurs at $h\approx5.083$, at which point $x\approx0.4016$ and the relative difference is about $4.6\%$.
Given that the 2D topology of the 3D box is as shown in the figures in this answer and previous answers, there is a simple geometric solution that clearly shows the max distance is the distance to B if you can only put food in one location of the box. If you draw a circle centered at A that completely encloses the 2D topology of the box, the only place that circle touches the box is at B. The radius is the longest straight line distance within the circle and that radius is the $sqrt{10}$Box inscribe in a circle