Proportion in sets We have $3$ sets of positive integers.
$$A = \{x_1,y_2,z_3\},\quad{} B = \{x_2,y_2,z_2\}, \quad{} C= \{x,y,z\}$$
Which proportion do we use for adding $A$ and $B$ ($x_1+x_2$ and so on), so the proportion in their numbers gets as close as possible to the proportion of the numbers in $C$ ($x,y,z$ make a proportion) ?  

Let's make some assumptions about things to approach this problem. We need a notion of comparing proportions, so let's say, given two triples $(a,b,c)$ and $(d,e,f)$, they are in-proportion equivalent to $(1, b/a, c/a)$ and $(1, e/d. f/d)$, so I will use the 2-norm to measure the difference and say that the distance $D$ between $(a,b,c)$ and $(d,e,f)$ is
$$
D = \sqrt{\left(\frac{b}{a} - \frac{e}{d}\right)^2
         +\left(\frac{c}{a} - \frac{f}{d}\right)^2}.
$$
We could have used a different metric (e.g. rescaling by 2nd or 3rd coordinate), but let's settle on this definition for now.
Then, given
$$
A = \begin{pmatrix} x_1 \\ y_1 \\ z_1 \end{pmatrix},
B = \begin{pmatrix} x_2 \\ y_2 \\ z_2 \end{pmatrix},
C = \begin{pmatrix} x   \\ y   \\ z   \end{pmatrix},
$$
we let $a, b \in \mathbb{R}^+$ and we can see that using a linear combination $aA + bB$ to approach $C$, we get to compare
$$
aA + bB
 = \begin{pmatrix} ax_1 + bx_2 \\ ay_1 + by_2 \\ az_1 + bz_2 \end{pmatrix}
$$
to $C$, which using our metric yields the distance of
$$
D^2 = \left(\frac{ay_1 + by_2}{ax_1 + bx_2} - \frac{y}{x}\right)^2
         +\left(\frac{az_1 + bz_2}{ax_1 + bx_2} - \frac{z}{x}\right)^2.
$$
Dividing numerator and denominator of both fractions by $a$ and letting $d = b/a$, we get
$$
D^2(d) = \left(\frac{y_1 + dy_2}{x_1 + dx_2} - \frac{y}{x}\right)^2
         +\left(\frac{z_1 + dz_2}{ax_1 + dx_2} - \frac{z}{x}\right)^2,
$$
where all elements except $d$ are fixed and the problem reduces to minimizing $D^2(d)$ (which is equivalent to minimizing $D(d)$ but easier) over all $d \in \mathbb{R}^+$.
Hope you can finish this from here.
