Hints:
$$\begin{align*}D_8&=\langle s,t\;;\;s^2=t^4=1\;,\;sts=t^3\}=\{1,s,t,t^2,t^3,st,st^2,st^3\}\;,\;\text{with usual relations}\\
Q_8&=\{a,b\;;\;a^4=1\,,\,a^2=b^2\,,\,aba=b\}=\{1,-1,i,j,k,-i,-j,-k:\}\;,\;\;\text{w.u.r.}\end{align*}$$
Check, for example, that
$$s^2=1\;,\;\;(st)^2=(sts)t=t^3t=1$$
Now, how many elements of order two are there in $\;Q_8\;$ ? This solves (a)
For (b): put
$$a=\begin{pmatrix}0&1\\\!\!-1&0\end{pmatrix}\;,\;\;b=\begin{pmatrix}0&1\\1&0\end{pmatrix}$$
and now verify that
$$a^4=1\,,\,b^2=1\,,\,bab=a^3\;\ldots$$
It's easy to show that $\langle -1\rangle$ is normal, because the elements $1$ and $-1$ commute with each element.
Consider $\langle i\rangle$; you just need to prove $xix^{-1}\in\langle i\rangle$, for every $x\in Q_8$, because you know $x1x^{-1}=1\in \langle i\rangle$ and $x(-1)x^{-1}=-1\in\langle i\rangle$; also $x(-i)x^{-1}=-xix^{-1}$, so $x(-i)x^{-1}\in\langle i\rangle$ as soon as $xix^{-1}\in\langle i\rangle$.
The statement is obviously true for $x=1,-1,i,-i$. Try with $j$:
$$
jij^{-1}=ji(-j)=-j(ij)=-jk=-i
$$
Similarly,
$$
kik^{-1}=ki(-k)=-(ki)k=-jk=-i
$$
Apply the same for $\langle j\rangle$ and $\langle k\rangle$.
On the other hand, you don't need to know special theorems for deducing that a subgroup $N$ of index $2$ in a group $G$ is normal. Indeed, the left cosets are $N$ and $gN=G\setminus N$ (where $g\notin N$), whereas the right cosets are $N$ and $Ng=G\setminus N$. So, for any $x\in N$, $xN=N=Nx$, and for $x\notin N$, $xN=G\setminus N=Nx$.
Best Answer
$Q_8$ has cyclic subgroups of index $2$, such as $\langle i\rangle$ and $\langle j\rangle$. Their inverse images in $G$ are of index $2$ and their respective centres contains at least the centre $Z$ of $G$. Hence their quotient by their centre is cyclic and finally $\pi^{-1}(\langle i\rangle)$ and $\pi^{-1}(\langle j\rangle)$ are abelian (cf. Jykri Lahtonen's comment). Select $g\in G$ with $\pi(g)=-1$. Then $g\in \pi^{-1}(\langle i\rangle)\cap \pi^{-1}(\langle j\rangle)$, hence it commutes with all elements of $\pi^{-1}(\langle i\rangle)$ and all elements of $\pi^{-1}(\langle j\rangle)$, therefore also with all elements of $\pi^{-1}(\langle i,j\rangle)=\pi^{-1}(Q_8)=G$, contradicting $g\notin Z$.