I have a list of chemical formulas that are each comprised of a number of base components. Two of the base components contain an additive, $X$. This additive needs to exist in each formula at a concentration of $3\%$. Of the two components, component $A$ contains $X$ at a concentration of $3\%$, $B$ contains $X$ at a concentration of $50\%$. Component $A$ may already exist in some of the formulas in differing quantities. I need to balance the quantities of component $A$ and component $B$ in each formula so the the $X$ additive will be $3\%$.
Unfortunately I can't seem to come up with a formula to describe this relationship. My feeble math skills say that something like $3x + 50x = 3y$ might be a start. Can anyone point me in the right direction?