Problem:
In rectangle PQRS,PQ=8 and QR=6. Points A and B lie on PQ​, points C and D lie on QR​, points E and F lie on RS, and points G and H lie on SP so that AP=BQ<4 and the convex octagon ABCDEFGH is equilateral. The length of a side of this octagon can be expressed in the form k+mn​, where k,m, and n are integers and n is not divisible by the square of any prime. What is k+m+n?
Answer Choices:
A. 1
B. 7
C. 21
D. 92
E. 106
Solution:
Because AP<4=21​PQ, it follows that A is closer to P than it is to Q and that A is between points P and B. Because AP=BQ,AH=BC, and angles APH and BQC are right angles, △APH≅△BQC. Thus PH=QC, and PQCH is a rectangle. Because CD=HG, it follows that HCDG is also a rectangle. Thus GDRS is a rectangle and DR=GS, and it follows that △ERD≅△FSG. Therefore segment EF is centered in RS just as congruent segment AB is centered in PQ​. Therefore △ERD≅△BQC, and CD is also centered in QR​. Let 2x be the side length AB=BC= CD=DE=EF=FG=GH=HA of the regular octagon; then AP=BQ=4−x and QC=RD=3−x. Applying the Pythagorean Theorem to △BQC yields (4−x)2+(3−x)2=(2x)2, which simplifies to 2x2+14x−25=0. Thus x=21​⋅(−7±311​), and because x>0, it follows that 2x=−7+311​. Hence k+m+n=−7+3+11=(B)7​.