Cube Geometry: Shortest Path Between Points - Adjacent Faces
The applet below illustrates the shortest path between points on two adjacent faces of a cube.
Drag the magenta-colored points. Rotate the view to convince yourself that the path is indeed the shortest.