so.. .at the beginning of the sale, there was a total of "x" pies
now, let's see what happened to those pies
[tex]\bf \begin{array}{lrlll}
&pies\\\\
&\textendash\textendash\textendash\textendash\textendash\textendash&\\
Mary&x-2\\\\
Kate&\cfrac{x-2}{2}\\\\
\textit{pies sold}&10\\\\
\textit{pies leftover}&14
\end{array}[/tex]
so, we had "x"
then Mary took 2, she left x - 2
Kate took half of that (x-2)/2
then 10 were sold, and 14 leftover
if we subtract all those figures, and solve for "x",
we should get what "x" was, so [tex]\bf (x-2)-\left( \cfrac{x-2}{2} \right)-10-14=0[/tex]
notice, if we subtract what Mary took, and Kate, and the sold and leftover, from the original "x", we would end up with no pies :)
so.. just solve for "x"