@bravekiwi Yes, this is a really clever trick! You can think of it by first drawing three triangles based on the original path through the rectangle.

M2W4D14ch4-triple-reflect.png

Then we can reflect the green triangle and shift it down by one, and shift the purple triangle down twice so that they span a grid that is three times as tall:

M2W4D14ch4-triple-reflect2.png

The diagonal line here isn't necessarily a straight one; it happens to look like that because the green line looks like it's almost symmetric. In general, only the shortest path would give a straight line, because that would minimize the distance from start to finish. 🙂