According to law of definite proportion, for a compound, elements always combine in fixed ratio by mass.
The formula of compound remains the same, let it be a_{x}b_{y} where, a and b are two different elements.
Since, the ratio of mass remains the same , calculate the ratio of masses of element a and b in both cases
\frac{a}{b}=\frac{15}{35}=\frac{10}{y}
rearranging,
y=\frac{10\times 35}{15}=23.3
Thus, mass of b produced will be 23.3 g.
I think its because an egg doesnt have the right chemical make up