I'm asked to show that $p, q \vdash p \wedge q$. Technically what must be shown is that $p, q \vdash \sim (p\rightarrow \sim q)$, since $\sim$ and $\rightarrow$ are taken as primitives. As axioms, I'm allowed to use all substitution instances of:
$$p \rightarrow (q\rightarrow p)$$ $$(p\rightarrow (q\rightarrow r))\rightarrow ((p\rightarrow q)\rightarrow (p\rightarrow r))$$
$$(\sim p \rightarrow \sim q)\rightarrow((\sim p \rightarrow q)\rightarrow p)$$
and only Modus Ponens as a rule of inference.
However I'm also allowed to use the Deduction Theorem, as well as $$p\rightarrow q, q\rightarrow r \vdash p\rightarrow r$$ $$p, \sim p \vdash q$$ $$\sim p \rightarrow \sim q \vdash q\rightarrow p$$ $$p \rightarrow q \vdash \sim q \rightarrow \sim p$$ $$\sim (p\rightarrow q)\vdash p$$ $$\sim (p\rightarrow q)\vdash \sim q$$ $$p\rightarrow q, \sim p \rightarrow q \vdash q$$
(I'm being somewhat informal in writing $\{a, b\} \vdash c$ as $a, b \vdash c$.)
I've been stuck on this exercise for more than an hour now and would appreciate any help.
I know from your previous question that you have shown $\neg \neg p \vdash p$
So, since you can easily show that $p, p \to \neg q \vdash \neg q$, you can use the fact that $\neg \neg p \vdash p$ to show that $p, \neg \neg (p \to \neg q) \vdash \neg q$. Thus, by the Deduction Theorem, you have $p \vdash \neg \neg (p \to \neg q) \to \neg q$.
Likewise, since it is trivial to show that $q, p \to \neg q \vdash q$, we also know that $q, \neg \neg (p \to \neg q) \vdash q$, and use the Deduction Theorem to obtain $q \vdash \neg \neg (p \to \neg q) \to q$.
So, starting with both $p$ and $q$, we can obtain both $\neg \neg (p \to \neg q) \to \neg q$ as well as $\neg \neg (p \to \neg q) \to q$, and then combine that with the following instance of Axiom 3:
$(\neg \neg (p \to \neg q) \to \neg q) \to ((\neg \neg (p \to \neg q) \to q) \to \neg (p \to \neg q)$
to obtain:
$\neg (p \to \neg q)$