We know that the short exact sequence $0 \to \mathbb{Z}/2\to Spin(d) \to SO(d) \to 1$.
Given the groups $A$ and $Q$, we require to have the additional data the 2-cocycle $ f \in H^2(BQ,A)$ and the map $r: Q \to Aut(A)$: $$ A, \quad Q, \quad f \in H^2(BQ,A),\quad r: Q \to Aut(A) $$ to specify the group extension $0 \to A\to E \to Q \to 1$,
$BQ$ is the classifying space of $Q$. The $A$ is the normal subgroup of $E$.
For $$ A=\mathbb{Z}/2, \quad Q=SO(d), \quad f = w_2(V_{SO(d)}) \in H^2(BSO(d),\mathbb{Z}/2)=\mathbb{Z}/2,\quad r: SO(d)\to Aut(\mathbb{Z}/2)=0 $$ here $w_2(V_{SO(d)})$ is a nontrivial 2-cocycle
Below is my attempt to determine the group multiplications in $g \in Spin(d)$ via $(a,q) \in (\mathbb{Z}/2, SO(d))$.
So given $g_1, g_2 \in Spin(d)$, we can write both as a doublet:
$$g_1=(a_1,q_1),\quad g_2=(a_2,q_2)\in (\mathbb{Z}/2,SO(d)), $$
Question: How could we reproduce the group multiplication rule of $g_1 \cdot g_2 \in Spin(d)$ via $(a_1,q_1)\cdot (a_2,q_2)$ in terms of the above data $A,Q,f,r$:
$$g_1 \cdot g_2 =(a_1,q_1)\cdot (a_2,q_2) =(a_1+r(q_2) a_2+f(q_1,q_2),q_1 q_2)$$
since $r$ is trivial identity map,
$$=(a_1,q_1)\cdot (a_2,q_2) =(a_1+ a_2+f(q_1,q_2),q_1 q_2)=?$$ how can we write the $f = w_2(V_{SO(d)}) \in H^2(BSO(d),\mathbb{Z}/2)$ of the second Stiefel Whitney class in terms of the $f(q_1,q_2)$ give the data of $q_1,q_2 \in SO(d)$? fully determine the multiplication rules?
$f(q_1,q_2)=?$