# Which of the following compounds were involved in the titration?

We have a sample that weighs $\pu{0.3148 g}$.This sample may contain one,two or even three of the following compounds: $\ce{NaOH, Na2CO3, NaHCO3}$. We have as a clue, that the sample was titrated with $\pu{20 mL}$ $\ce{HCl}$ $\pu{0.09 M}$ using phenolphthalein as an indicator. Later, the sample was titrated with $\pu{50 mL}$ of the same $\ce{HCl}$ using orange methyl as an indicator.

The question is how do we understand which of the compounds were involved? Should we set for example mass of $\ce{NaOH} = x$, mass of $\ce{Na2CO3} = y$ and mass of $\ce{Na2CO3} = z$, then write down the reactions between all of the compounds with $\ce{HCl}$ and then extract some equations from the equivalent point? One equation comes from the total mass.

Assume the variables $x$, $y$, $z$. You need three equations to get the values.
First equation: Add all three and equate to $\pu{0.3148g}$.