Problem: Two spheres with radii $36$ and one sphere with radius $13$ are each externally tangent to the other two spheres and to two different planes $\mathcal{P}$ and $\mathcal{Q}$ . The intersection of planes $\mathcal{P}$ and $\mathcal{Q}$ is the line $\ell$ . The distance from line $\ell$ to the point where the sphere with radius $13$ is tangent to plane $\mathcal{P}$ is $\tfrac{m}{n}$ , where $m$ and $n$ are relatively prime positive integers. Find $m + n$

Solution: This solution refers to the Diagram section.
As shown below, let $O_1,O_2,O_3$ be the centers of the spheres (where sphere $O_3$ has radius $13$ ) and $T_1,T_2,T_3$ be their respective points of tangency to plane $\mathcal{P}.$ Let $\mathcal{R}$ be the plane that is determined by $O_1,O_2,$ and $O_3.$ Suppose $A$ is the foot of the perpendicular from $O_3$ to line $\ell,$ so $\overleftrightarrow{O_3A}$ is the perpendicular bisector of $\overline{O_1O_2}.$ We wish to find $T_3A.$ [asy] /* Made by MRENTHUSIASM */ size(300); import graph3; import solids;  currentprojection=orthographic((1,1/2,0)); triple O1, O2, O3, T1, T2, T3, A, L1, L2; O1 = (0,-36,0); O2 = (0,36,0); O3 = (0,0,-sqrt(1105)); T1 = (864*sqrt(1105)/1105,-36,-828*sqrt(1105)/1105); T2 = (864*sqrt(1105)/1105,36,-828*sqrt(1105)/1105); T3 = (24*sqrt(1105)/85,0,-108*sqrt(1105)/85); A = (0,0,-36*sqrt(1105)/23); L1 = shift(0,-80,0)*A; L2 = shift(0,80,0)*A;  draw(surface(L1--L2--(-T2.x,L2.y,T2.z)--(-T1.x,L1.y,T1.z)--cycle),pink); draw(surface(L1--L2--(L2.x,L2.y,40)--(L1.x,L1.y,40)--cycle),gray); draw(shift(O1)*rotate(90,O1,O2)*scale3(36)*unithemisphere,yellow,light=White); draw(shift(O2)*rotate(90,O1,O2)*scale3(36)*unithemisphere,yellow,light=White); draw(shift(O3)*rotate(90,O1,O2)*scale3(13)*unithemisphere,red,light=White); draw(surface(L1--L2--(T2.x,L2.y,T2.z)--(T1.x,L1.y,T1.z)--cycle),palegreen); draw(surface(L1--L2--(-T2.x,L2.y,L2.z-abs(T2.z))--(-T1.x,L1.y,L2.z-abs(T1.z))--cycle),palegreen); draw(surface(L1--L2--(L2.x,L2.y,L2.z-abs(T1.z))--(L1.x,L1.y,L1.z-abs(T2.z))--cycle),gray); draw(surface(L1--L2--(T2.x,L2.y,L2.z-abs(T1.z))--(T1.x,L1.y,L1.z-abs(T2.z))--cycle),pink); draw(O1--O2--O3--cycle^^O3--A,dashed); draw(T1--T2--T3--cycle^^T3--A,heavygreen); draw(O1--T1^^O2--T2^^O3--T3,mediumblue+dashed); draw(L1--L2,L=Label("$\ell$",position=EndPoint,align=3*E),red);  label("$\mathcal{P}$",midpoint(L1--(T1.x,L1.y,T1.z)),(0,-3,0),heavygreen); label("$\mathcal{Q}$",midpoint(L1--(T1.x,L1.y,L1.z-abs(T2.z))),(0,-3,0),heavymagenta); label("$\mathcal{R}$",O1,(0,-24,0));  dot("$O_1$",O1,(0,-1,1),linewidth(4.5)); dot("$O_2$",O2,(0,1,1),linewidth(4.5)); dot("$O_3$",O3,(0,-1.5,0),linewidth(4.5)); dot("$T_1$",T1,(0,-1,-1),heavygreen+linewidth(4.5)); dot("$T_2$",T2,(0,1,-1),heavygreen+linewidth(4.5)); dot("$T_3$",T3,(0,-1,-1),heavygreen+linewidth(4.5)); dot("$A$",A,(0,0,-2),red+linewidth(4.5)); [/asy] Note that:
Now, we focus on cross-sections $O_1O_3T_3T_1$ and $\mathcal{R}:$
We have the following diagram: [asy] size(300); import graph3; import solids;  currentprojection=orthographic((1,1/2,0)); triple O1, O3, T1, T3, A, B, C, D; O1 = (0,-36,0); O3 = (0,0,-sqrt(1105)); T1 = (864*sqrt(1105)/1105,-36,-828*sqrt(1105)/1105); T3 = (24*sqrt(1105)/85,0,-108*sqrt(1105)/85); A = (0,0,-36*sqrt(1105)/23); B = intersectionpoint(O1--O1+100*(O3-O1),T1--T1+100*(T3-T1)); C = (0,-36,-36*sqrt(1105)/23); D = (0,-36,-sqrt(1105));  draw(C--O1--O3--A^^D--O3--B,dashed); draw(T1--T3--A^^T3--B,heavygreen); draw(O1--T1^^O3--T3,mediumblue+dashed); draw(shift(0,-80,0)*A--shift(0,80,0)*A,L=Label("$\ell$",position=EndPoint,align=3*E),red); dot("$O_1$",O1,(0,-1,1),linewidth(4.5)); dot("$O_3$",O3,(0,1,1),linewidth(4.5)); dot("$T_1$",T1,(0,-1,-1),heavygreen+linewidth(4.5)); dot("$T_3$",T3,(0,-1,-1),heavygreen+linewidth(4.5)); dot("$A$",A,(0,0,-2),red+linewidth(4.5)); dot("$B$",B,(0,0,-2),red+linewidth(4.5)); dot("$C$",C,(0,0,-2),red+linewidth(4.5)); dot("$D$",D,(0,-2,0),linewidth(4.5)); [/asy] In cross-section $O_1O_3T_3T_1,$ since $\overline{O_1T_1}\parallel\overline{O_3T_3}$ as discussed, we obtain $\triangle O_1T_1B\sim\triangle O_3T_3B$ by AA, with the ratio of similitude $\frac{O_1T_1}{O_3T_3}=\frac{36}{13}.$ Therefore, we get $\frac{O_1B}{O_3B}=\frac{49+O_3B}{O_3B}=\frac{36}{13},$ or $O_3B=\frac{637}{23}.$
In cross-section $\mathcal{R},$ note that $O_1O_3=49$ and $DO_3=\frac{O_1O_2}{2}=36.$ Applying the Pythagorean Theorem to right $\triangle O_1DO_3,$ we have $O_1D=\sqrt{1105}.$ Moreover, since $\ell\perp\overline{O_1C}$ and $\overline{DO_3}\perp\overline{O_1C},$ we obtain $\ell\parallel\overline{DO_3}$ so that $\triangle O_1CB\sim\triangle O_1DO_3$ by AA, with the ratio of similitude $\frac{O_1B}{O_1O_3}=\frac{49+\frac{637}{23}}{49}.$ Therefore, we get $\frac{O_1C}{O_1D}=\frac{\sqrt{1105}+DC}{\sqrt{1105}}=\frac{49+\frac{637}{23}}{49},$ or $DC=\frac{13\sqrt{1105}}{23}.$
Finally, note that $\overline{O_3T_3}\perp\overline{T_3A}$ and $O_3T_3=13.$ Since quadrilateral $DCAO_3$ is a rectangle, we have $O_3A=DC=\frac{13\sqrt{1105}}{23}.$ Applying the Pythagorean Theorem to right $\triangle O_3T_3A$ gives $T_3A=\frac{312}{23},$ from which the answer is $312+23=\boxed{335}.$

Answer:  335