A square of perimeter 20 is inscribed in a square of perimeter 28. What is the greatest distance between a vertex of the inner square and a vertex of the outer square?
$\text{(A) } \sqrt{58}\quad \text{(B) } \frac{7\sqrt{5}}{2}\quad \text{(C) } 8\quad \text{(D) } \sqrt{65}\quad \text{(E) } 5\sqrt{3}$
Assume one of the segments bisected by the inscribed square has length $x$. Thus, the alternate segment has length $7-x$. Applying Pythagorean's Theorem, $x^2+(x-7)^2=5^2$. Simplifying, $(x-3)(x-4)=0$, so $x=3$ or $x=4$ (it does not matter, as rotations produce the same figure). The longest line that can be made forms a right triangle with legs 
of $4$ and $7$. $\sqrt{4^2+7^2}=\sqrt{65} \rightarrow \boxed{D}$