Since $Q$ is symmetric we can find an orthogonal matrix $P$ such that $P^tDP=Q$, where $D$ is diagonal. Therefore $\det\pmatrix{Q&w\\\ v^t&0}=\det\pmatrix{P^t&0\\\ 0&1}\pmatrix{Q&w\\\ v^t&0}\pmatrix{P&0\\\ 0&1}=\det\pmatrix{D&P^tw\\\ v^t P&0},$ so we just have to deal with the case $Q$ diagonal. We can write $D=\operatorname{diag}(\alpha_q,\ldots,\alpha_1)$ and let D':=\operatorname{diag}(\alpha_{q-1},\ldots,\alpha_1), . We expand the last determinant with respect to the first line: \det\pmatrix{Q&w\\\ v^t&0}=\alpha_q\det\pmatrix{D'&(P^tw)'\\\ (v^tP)'&0}+(P^tw)_1(-1)^{q+1}\cdot (-1)^{q-1+1}(v^tP)_1\alpha_{q-1}\ldots \alpha_1, so the result follows by induction on $q$, after having checked it for $q=1$.