A plane contains points $A$ and $B$ with $AB = 1$. Point $A$ is rotated counterclockwise through an acute angle $\theta$ around $B$ to point $A'$. Then $B$ is rotated clockwise through angle $\theta$ around $A'$ to point $B'$. If $AB' = \tfrac{4}{3}$, and $\cos\theta = \tfrac{m}{n}$ with $\gcd(m,n)=1$, find $m + n$.
Place $B$ at the origin and $A$ at $(1, 0)$. After rotating $A$ around $B$ by $\theta$, $A' = (\cos\theta, \sin\theta)$. Rotating $B$ clockwise by $\theta$ around $A'$ gives $B' = (\cos\theta - 1,\;\sin\theta)$.
Then $AB' = \sqrt{(\cos\theta - 2)^2 + \sin^2\theta} = \sqrt{5 - 4\cos\theta}$. Setting $\sqrt{5 - 4\cos\theta} = \tfrac{4}{3}$ and squaring yields $\cos\theta = \tfrac{29}{36}$, so $m + n = 29 + 36$.