Solution (source code)

= Solution

Let $| -\rangle=(|0\rangle-|1\rangle)/\sqrt2$. Applying the oracle with this answer qubit produces phase kickback:
$$
U_f|x\rangle| -\rangle=(-1)^{f(x)}|x\rangle| -\rangle.
$$
Inside $A$, the $X$ gates on both search qubits conjugate the phase oracle for $11$. Hence
$$
A|x_1x_2\rangle| -\rangle
=(-1)^{[x_1x_2=00]}|x_1x_2\rangle| -\rangle
=I_0|x_1x_2\rangle| -\rangle,
$$
where $I_0=I-2|00\rangle\langle00|$.

The first oracle similarly acts on the search register as $I_{x_0}=I-2|x_0\rangle\langle x_0|$. Reading the remaining gates from right to left, the search-register operation after its initial Hadamards is therefore
$$
-Q=H^{\otimes2}I_0H^{\otimes2}I_{x_0},
$$
while the answer qubit remains in $| -\rangle$.