Your proof of a) is incomplete, though what you have so far is correct.
Sentences in propositional calculus usually consist of atomic propositions $P_i$ and the connectives $\land, \lor, \to$ as well as $\
eg$. Thus you need to prove that any sentence built out of these symbols has an equivalent formula using only NAND.
So you have already shown that $A \land B \equiv (A ~\text{NAND} ~B) ~\text{NAND} ~(A ~\text{NAND} ~B)$, but now you need to do the same for the other symbols. You need to show that $A \lor B$, $A \to B$, and $\
eg A$ can be rewritten using only NAND.
For b), you essentially need to do the same thing, prove that any formula using $\land, \lor, \to, \
eg$ can be rewritten to use only XOR, $\land$, and a constant $T$. But there is a shortcut, if you can simply prove that $A~ \text{NAND} ~B$ is equivalent to some combination of XOR, $\land, T$, then you can use a) to prove b).