Proof: By Euclid
(related to Proposition: Prop. 10.005: Ratio of Commensurable Magnitudes)
Modern Formulation
(not yet contributed)
 For if $A$ and $B$ are commensurable (magnitudes) then some magnitude will measure them.
 Let it (so) measure (them), and let it be $C$.
 And as many times as $C$ measures $A$, so many units let there be in $D$.
 And as many times as $C$ measures $B$, so many units let there be in $E$.
 Therefore, since $C$ measures $A$ according to the units in $D$, and a unit also measures $D$ according to the units in it, a unit thus measures the number $D$ as many times as the magnitude $C$ (measures) $A$.
 Thus, as $C$ is to $A$, so a unit (is) to $D$^{1} [Def. 7.20] .
 Thus, inversely, as $A$ (is) to $C$, so $D$ (is) to a unit [Prop. 5.7 corr.] .
 Again, since $C$ measures $B$ according to the units in $E$, and a unit also measures $E$ according to the units in it, a unit thus measures $E$ the same number of times that $C$ (measures) $B$.
 Thus, as $C$ is to $B$, so a unit (is) to $E$ [Def. 7.20] .
 And it was also shown that as $A$ (is) to $C$, so $D$ (is) to a unit.
 Thus, via equality, as $A$ is to $B$, so the number $D$ (is) to the (number) $E$ [Prop. 5.22].
 Thus, the commensurable magnitudes $A$ and $B$ have to one another the ratio which the number $D$ (has) to the number $E$.
 (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"
Footnotes