Let $ABCD$ be a cyclic quadrilateral with $AB=4,BC=5,CD=6,$ and $DA=7.$ Let $A_1$ and $C_1$ be the feet of the perpendiculars from $A$ and $C,$ respectively, to line $BD,$ and let $B_1$ and $D_1$ be the feet of the perpendiculars from $B$ and $D,$ respectively, to line $AC.$ The perimeter of $A_1B_1C_1D_1$ is $\frac mn,$ where $m$ and $n$ are relatively prime positive integers. Find $m+n.$
This solution refers to the Diagram section.
By the Converse of the Inscribed Angle Theorem, if distinct points $X$ and $Y$ lie on the same side of $\overline{PQ}$ (but not on $\overline{PQ}$ itself) for which $\angle PXQ=\angle PYQ,$ then $P,Q,X,$ and $Y$ are cyclic. From the Converse of the Inscribed Angle Theorem, quadrilaterals $ABA_1B_1,BCC_1B_1,CDC_1D_1,$ and $DAA_1D_1$ are all cyclic.
Suppose $\overline{AC}$ and $\overline{BD}$ intersect at $E,$ and let $\angle AEB=\theta.$ It follows that $\angle CED=\theta$ and $\angle BEC=\angle DEA=180^\circ-\theta.$
We obtain the following diagram:

In every cyclic quadrilateral, each pair of opposite angles is supplementary. So, we have $\angle EA_1B_1=\angle EAB$ (both supplementary to $\angle B_1A_1B$) and $\angle EB_1A_1=\angle EBA$ (both supplementary to $\angle A_1B_1A$), from which $\triangle A_1B_1E \sim \triangle ABE$ by AA, with the ratio of similitude \[\frac{A_1B_1}{AB}=\underbrace{\frac{A_1E}{AE}}_{\substack{\text{right} \\ \triangle A_1AE}}=\underbrace{\frac{B_1E}{BE}}_{\substack{\text{right} \\ \triangle B_1BE}}=\cos\theta. \hspace{15mm}(1)\]
Similarly, we have $\angle EC_1D_1=\angle ECD$ (both supplementary to $\angle D_1C_1D$) and $\angle ED_1C_1=\angle EDC$ (both supplementary to $\angle C_1D_1C$), from which $\triangle C_1D_1E \sim \triangle CDE$ by AA, with the ratio of similitude \[\frac{C_1D_1}{CD}=\underbrace{\frac{C_1E}{CE}}_{\substack{\text{right} \\ \triangle C_1CE}}=\underbrace{\frac{D_1E}{DE}}_{\substack{\text{right} \\ \triangle D_1DE}}=\cos\theta. \hspace{14.75mm}(2)\]
We apply the Transitive Property to $(1)$ and $(2):$


We get $\frac{B_1E}{BE}=\frac{C_1E}{CE}=\cos\theta,$ so $\triangle B_1C_1E \sim \triangle BCE$ by SAS, with the ratio of similitude \[\frac{B_1C_1}{BC}=\frac{B_1E}{BE}=\frac{C_1E}{CE}=\cos\theta. \hspace{14.75mm}(3)\]
We get $\frac{D_1E}{DE}=\frac{A_1E}{AE}=\cos\theta,$ so $\triangle D_1A_1E \sim \triangle DAE$ by SAS, with the ratio of similitude \[\frac{D_1A_1}{DA}=\frac{D_1E}{DE}=\frac{A_1E}{AE}=\cos\theta. \hspace{14mm}(4)\]

From $(1),(2),(3),$ and $(4),$ the perimeter of $A_1B_1C_1D_1$ is
\begin{align*} A_1B_1+B_1C_1+C_1D_1+D_1A_1&=AB\cos\theta+BC\cos\theta+CD\cos\theta+DA\cos\theta \\ &=(AB+BC+CD+DA)\cos\theta \\ &=22\cos\theta. &&\hspace{5mm}(\bigstar) \end{align*}
Two solutions follow from here:

Solution 1.1 (Law of Cosines)
Note that $\cos(180^\circ-\theta)=-\cos\theta$ holds for all $\theta.$ We apply the Law of Cosines to $\triangle ABE, \triangle BCE, \triangle CDE,$ and $\triangle DAE,$ respectively:
\begin{alignat*}{12} &&&AE^2+BE^2-2\cdot AE\cdot BE\cdot\cos\angle AEB&&=AB^2&&\quad\implies\quad AE^2+BE^2-2\cdot AE\cdot BE\cdot\cos\theta&&=4^2, \hspace{15mm} &(1\star) \\ &&&BE^2+CE^2-2\cdot BE\cdot CE\cdot\cos\angle BEC&&=BC^2&&\quad\implies\quad BE^2+CE^2+2\cdot BE\cdot CE\cdot\cos\theta&&=5^2, \hspace{15mm} &(2\star) \\ &&&CE^2+DE^2-2\cdot CE\cdot DE\cdot\cos\angle CED&&=CD^2&&\quad\implies\quad CE^2+DE^2-2\cdot CE\cdot DE\cdot\cos\theta&&=6^2, \hspace{15mm} &(3\star) \\ &&&DE^2+AE^2-2\cdot DE\cdot AE\cdot\cos\angle DEA&&=DA^2&&\quad\implies\quad DE^2+AE^2+2\cdot DE\cdot AE\cdot\cos\theta&&=7^2. \hspace{15mm} &(4\star) \\ \end{alignat*}
We subtract $(1\star)+(3\star)$ from $(2\star)+(4\star):$
\begin{align*} 2\cdot AE\cdot BE\cdot\cos\theta+2\cdot BE\cdot CE\cdot\cos\theta+2\cdot CE\cdot DE\cdot\cos\theta+2\cdot DE\cdot AE\cdot\cos\theta&=22 \\ 2\cdot\cos\theta\cdot(\phantom{ }\underbrace{AE\cdot BE+BE\cdot CE+CE\cdot DE+DE\cdot AE}_{\text{Use the result from }\textbf{Remark}\text{.}}\phantom{ })&=22 \\ 2\cdot\cos\theta\cdot59&=22 \\ \cos\theta&=\frac{11}{59}. \end{align*}
Finally, substituting this result into $(\bigstar)$ gives $22\cos\theta=\frac{242}{59},$ from which the answer is $242+59=\boxed{301}.$
~MRENTHUSIASM (credit given to Math Jams's 2021 AIME I Discussion)

Solution 1.2 (Area Formulas)
Let the brackets denote areas. 
We find $[ABCD]$ in two different ways:


Note that $\sin(180^\circ-\theta)=\sin\theta$ holds for all $\theta.$ By area addition, we get
\begin{align*} [ABCD]&=[ABE]+[BCE]+[CDE]+[DAE] \\ &=\frac12\cdot AE\cdot BE\cdot\sin\angle AEB+\frac12\cdot BE\cdot CE\cdot\sin\angle BEC+\frac12\cdot CE\cdot DE\cdot\sin\angle CED+\frac12\cdot DE\cdot AE\cdot\sin\angle DEA \\ &=\frac12\cdot AE\cdot BE\cdot\sin\theta+\frac12\cdot BE\cdot CE\cdot\sin\theta+\frac12\cdot CE\cdot DE\cdot\sin\theta+\frac12\cdot DE\cdot AE\cdot\sin\theta \\ &=\frac12\cdot\sin\theta\cdot(\phantom{ }\underbrace{AE\cdot BE+BE\cdot CE+CE\cdot DE+DE\cdot AE}_{\text{Use the result from }\textbf{Remark}\text{.}}\phantom{ }) \\ &=\frac12\cdot\sin\theta\cdot59. \end{align*}
By Brahmagupta's Formula, we get \[[ABCD]=\sqrt{(s-AB)(s-BC)(s-CD)(s-DA)}=2\sqrt{210},\] where $s=\frac{AB+BC+CD+DA}{2}=11$ is the semiperimeter of $ABCD.$

Equating the expressions for $[ABCD],$ we have
\[\frac12\cdot\sin\theta\cdot59=2\sqrt{210},\] so $\sin\theta=\frac{4\sqrt{210}}{59}.$ Since $0^\circ0.$ It follows that \[\cos\theta=\sqrt{1-\sin^2\theta}=\frac{11}{59}.\]
Finally, substituting this result into $(\bigstar)$ gives $22\cos\theta=\frac{242}{59},$ from which the answer is $242+59=\boxed{301}.$
~MRENTHUSIASM (credit given to Leonard my dude)

Remark (Ptolemy's Theorem)
In $ABCD,$ we have
\begin{align*} AE\cdot BE+BE\cdot CE+CE\cdot DE+DE\cdot AE &= (AE+CE)(BE+DE) &&\hspace{10mm}\text{Factor by Grouping} \\ &=AC\cdot BD &&\hspace{10mm}\text{Segment Addition} \\ &=AB\cdot CD+BC\cdot DA &&\hspace{10mm}\text{Ptolemy's Theorem} \\ &=59. &&\hspace{10mm}\text{Substitution} \end{align*}
~MRENTHUSIASM