There is a room in the shape of the cuboid. A spider sits somewhere on one of the faces. And there is a dead fly on one of the faces as well. The spider wants to get to the fly along the shortest path by crawling along the faces of the cuboid. The optimal path should have the property that once it leaves a face of the cuboid, it doesn't come back to the same face again. Can we prove this?
EDIT: Context is a spider and fly riddle: https://mathworld.wolfram.com/SpiderandFlyProblem.html. I'm looking to develop an algorithm that finds an optimal solution in general (for any solid and positions of spider and fly) and this property is required for such an algorithm.
@AHusain's comment contains the answer, but it looks from the comments as if you didn't realise this. So to make it explicit:
Suppose the spider leaves a face at point $A$ and re-enters the same face at point $B$. Then the path that the spider took from $A$ to $B$ must necessarily be longer than the straight line from $A$ to $B$, which can be traversed without leaving the face.