Why did Euclid treat magnitudes and numbers twice? In the Elements, Euclid states and proves twice that (in modern notation)
$$\boxed{\text{from } \frac{a}{b} = \frac{c}{d} \text{ it follows that } \frac{a}{b} = \frac{a-c}{b-d}}$$
– first for magnitudes (lengths), then for numbers.
(1) Book V, Proposition 19


(2) Book VII, Proposition 11

Note that the proper propositions are almost identical in the Greek original:

So what does it mean that Euclid decidedly treats magnitudes (lengths) separately from numbers, even though he was obviously aware that they are (or behave) very much the same? 
Furthermore, in the two proofs he makes use of different definitions, i.e. axioms, i.e. theories - but arrives at the very same result. What does this tell us about the two theories?
 A: To Euclid, number meant whole number, or ratio of whole numbers (fraction). On the other hand, length was just that: the length of a line segment. It had been shown that some lengths were not "numbers" in Euclid's sense, in particular $\sqrt{2}$, the length of a diagonal of a unit square. So, not all lengths were numbers.
On the other hand, multiplication of lengths was very limited: it only made sense to multiply two or three lengths together, since objects were only $2$- or $3$-dimensional! On the other hand, one could multiply as many numbers as desired, since they were separate entities, not bound by geometry.
Therefore, to the ancient Greeks, numbers and lengths were completely separate things: they had different uses and behaved differently. So, Euclid had to treat them separately when proving properties about them.
A: Euclid defines proportionality differently for magnitudes than for numbers.

Definition V.5: Magnitudes are said to be in the same ratio, the first to the second and the third to the fourth, when, if any equimultiples whatever are taken of the first and third, and any equimultiples whatever of the second and fourth, the former equimultiples alike exceed, are alike equal to, or alike fall short of, the latter equimultiples respectively taken in corresponding order.
Definition V.6: Let magnitudes which have the same ratio be called proportional.

But

Definition VII.20: Numbers are proportional when the first is the same multiple, or the same part, or the same parts, of the second that the third is of the fourth.

Note that the second definition is a lot simpler than the first! So, when proving things from it, there's a lot less to check, which is why your second proof is shorter than your first proof.
Intuitively, numbers are all multiples of the same common unit, so can be dealt with via (what we in modern times would call) integer arithmetic. But magnitudes have no such restriction, so you need to do something resembling real analysis to work with them. (When Dedekind constructs the real numbers, he mentions being inspired by Euclid's Definition V.5...)
