Circuit design using only NANDs and Inverters
You have done a great job working out the independent output equations:

$$\begin{align*}
X &amp;= D\:\overline{C}+B\:\overline{A}\\
Y &amp;= C + B\:\overline{A}
\end{align*}$$

You need to apply a NAND as the final stage for each, right? I assume you already know de Morgan's two laws, cold. Right?

So just look at your two equations. They are both in sum of products form. Just double-NOT them and see where that takes you:

$$\begin{align*}
X &amp;= \overline{\overline{D\:\overline{C}+B\:\overline{A}}}&amp;&amp;=\overline{\overline{D\:\overline{C}}\cdot\overline{B\:\overline{A}}}\\
Y &amp;= \overline{\overline{C + B\:\overline{A}}}&amp;&amp;=\overline{\overline{C} \cdot \overline{B\:\overline{A}}}
\end{align*}$$

Well, there is definitely something useful there:







simulate this circuit &ndash; Schematic created using CircuitLab

That pretty much gives it all away. Can you now proceed to complete the answer?



Enough time has gone by (about a full day since asked.) I might as well complete this for others who may come upon this and want to learn from it.

From the above, it's obvious now that:







simulate this circuit

Looks like two inverters and four NANDs.