Proof: By Euclid
(related to Proposition: 5.09: Magnitudes with Same Ratios are Equal)
 For if not, $A$ and $B$ would not each have the same ratio to $C$ [Prop. 5.8].
 But they do.
 Thus, $A$ is equal to $B$.
 So, again, let $C$ have the same ratio to each of $A$ and $B$.
 I say that $A$ is equal to $B$.
 For if not, $C$ would not have the same ratio to each of $A$ and $B$ [Prop. 5.8].
 But it does.
 Thus, $A$ is equal to $B$.
 Thus, (magnitudes) having the same ratio to the same (magnitude) are equal to one another.
 And those (magnitudes) to which the same (magnitude) has the same ratio are equal.
 (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"