Solution (source code)

= Solution

Put $H=\neg(P\to\neg Q)$. First derive $Q$, then $P$, using the derived <proof by contradiction> rule. Indentation records the <subproofs>:
$$
\begin{array}{rll}
1&H&\text{premise}\\
2&\quad\neg Q&\text{assumption}\\
3&\qquad P&\text{assumption}\\
4&\qquad\neg Q&\text{reiterate }2\\
5&\quad P\to\neg Q&\to I\ 3\text{--}4\\
6&\quad\bot&\neg E\ 1,5\\
7&Q&\mathrm{RAA}\ 2\text{--}6\\
8&\quad\neg P&\text{assumption}\\
9&\qquad P&\text{assumption}\\
10&\qquad\bot&\neg E\ 9,8\\
11&\qquad\neg Q&\bot E\ 10\\
12&\quad P\to\neg Q&\to I\ 9\text{--}11\\
13&\quad\bot&\neg E\ 1,12\\
14&P&\mathrm{RAA}\ 8\text{--}13\\
15&Q\land P&\land I\ 7,14
\end{array}
$$
Line 11 uses <explosion>; lines 5 and 12 discharge only their inner assumptions. Each RAA step can be expanded into <negation introduction> followed by <double-negation elimination>, as in part (ii).