Unflod your rectangle to make a grid and place K, L, M and N on it. You goal is to shorten the distance $KL+LM+MN+NK'$.
You need to align $KLMNK'$ to reach the minimal distance for $KK'$. That's $2.AC$
Here is a picture of a non-optimal situation. If it were optimal, then $KLM'N'K'$ would be a straight line.
!Illustration
Here is a picure of an optimal situation:
!enter image description here