Hi, folks. I've figured out how to do something but not how/why it works.
Here's the problem:
x+y+z=871
The proportion of x:y = 4:5 and the proportion of y:z = 3:8.
What is the value of y?
I've attached an image I made on the free iOS app MathMagic. I'm sure I've NOT written the thing out in technically correct terms (would welcome help), but the example aids in illustration. The algorithm works, but I just want to know how/why mathematically. Any help would be appreciated to make it look better and say what I intend it to say.
The process with plain text is as follows:
4:5 = 4/5 and 3:8 = 3/8.
1) Multiply the numerator of 4/5 by the numerator of 3/8 to get 12.
2) Multiply the numerator of 3/8 by the denominator of 4/5 to get 15.
3) Multiply the denominator of 4/5 by the denominator of 3/8 to get 40.
4) Add the three products to get 12+15+40=67.
5) 12/67 + 15/67 + 40/67 = x+y+z = 871
6) 15/67 = y/871 =195/871
7) Answer: y = 195
I'd like to be able to explain why it works and figure out how to extend this to problems with more variables and more proportions.

Thank you.
Here's the problem:
x+y+z=871
The proportion of x:y = 4:5 and the proportion of y:z = 3:8.
What is the value of y?
I've attached an image I made on the free iOS app MathMagic. I'm sure I've NOT written the thing out in technically correct terms (would welcome help), but the example aids in illustration. The algorithm works, but I just want to know how/why mathematically. Any help would be appreciated to make it look better and say what I intend it to say.
The process with plain text is as follows:
4:5 = 4/5 and 3:8 = 3/8.
1) Multiply the numerator of 4/5 by the numerator of 3/8 to get 12.
2) Multiply the numerator of 3/8 by the denominator of 4/5 to get 15.
3) Multiply the denominator of 4/5 by the denominator of 3/8 to get 40.
4) Add the three products to get 12+15+40=67.
5) 12/67 + 15/67 + 40/67 = x+y+z = 871
6) 15/67 = y/871 =195/871
7) Answer: y = 195
I'd like to be able to explain why it works and figure out how to extend this to problems with more variables and more proportions.

Thank you.