Can I say "X differs from A to B by C"?
No.
If we are speaking of X, some quality or quantity possessed by both A and B in different amounts, we say that
X differs between (or in) A and B . . .
Mean skin color differs between/in American and British populations of African ancestry . . .
From is used when we compare A with B:
A differs from B in X . . .
The American population of African ancestry differs from that of Britain in mean skin color . . .
In either of these, by is used to characterize the scale of the difference, not a cause:
{X differs between A and B / A differs from B in X} by Y
Mean skin color differs between American and British populations by 5.2 points.
The American population differs from the British population in mean skin color by 5.2 points.
If you want to ascribe the difference in X to a difference in some other variable, Z, you have many options: you can mix-and-match various prepositionals (e.g.,because of, due to, by virtue of) with various descriptions of the differential factor (e.g. the difference in their respective Zs, their different Zs, differing Zs, their having different Zs).
The American population of African descent differs in mean skin color from that of Great Britain by 5.2 points by virtue of their having significantly different proportions of melanin.