$ of the routes through $A$ and $B$ determine pairs of congruent triangles with the (other) vertices $X$ and $Y$ of the square with diagonal $\overline{AB}$. The key midpoint property then becomes clear (and nicely related to the distance from starting point to square-corner).
Now, starting at any point on the $Y$ side of $\overleftrightarrow{AB}$, the instructions (with appropriately-oriented turns) take you to $X$ (necessarily the midpoint of $\overline{A^\prime B^\prime}$); and vice-versa. (What about points _on_ $\overleftrightarrow{AB}$?) So, you should check both points, just to be sure. $\square$