Proof: By Euclid
(related to Proposition: Prop. 8.26: Similar Plane Numbers have Same Ratio as between Two Squares)
 For since $A$ and $B$ are similar plane numbers, one number thus falls (between) $A$ and $B$ in mean proportion [Prop. 8.18].
 Let it (so) fall, and let it be $C$.
 And let the least numbers, $D$, $E$, $F$, having the same ratio as $A$, $C$, $B$ have been taken [Prop. 8.2].
 The outermost of them, $D$ and $F$, are thus square [Prop. 8.2 corr.] .
 And since as $D$ is to $F$, so $A$ (is) to $B$, and $D$ and $F$ are square, $A$ thus has to $B$ the ratio which (some) square number (has) to a(nother) square number.
 (Which is) the very thing it was required to show.
∎
Thank you to the contributors under CC BYSA 4.0!
 Github:

 nonGithub:
 @Fitzpatrick
References
Adapted from (subject to copyright, with kind permission)
 Fitzpatrick, Richard: Euclid's "Elements of Geometry"