I would think you can use the convex hull generated by $A$, $B$ and the polygon. Clearly then $A$, $B$ are located on the boundary of the convex hull. Then $A$, $B$ dissect the boundary in 2 parts. Choose the part which is shorter than the other.
I would think you can use the convex hull generated by $A$, $B$ and the polygon. Clearly then $A$, $B$ are located on the boundary of the convex hull. Then $A$, $B$ dissect the boundary in 2 parts. Choose the part which is shorter than the other.