TITLE: Profinite completion of a semidirect product
QUESTION [10 upvotes]: If we have two finitely generated residually finite groups $G$ and $H$, is there are relation between
the profinite completions $\hat{G},\hat{H}$ and the profinite completion of a semidirect 
product $\hat{G \rtimes H}$
(and analogous question for pro-p completions)

REPLY [2 votes]: Let $\mathscr{P}$ be any property
such that whenever a group has $\mathscr{P}$ then all its subgroups also have $\mathscr{P}$.
In [1] Theorem 3.1, K. W. Gruenberg has proved that if the wreath product
$W= A \wr B$, is residually $\mathscr{P}$,
then either $B$ is $\mathscr{P}$ or $A$ is abelian. 
Consider $W= S_3 \wr \mathbb{Z}$, where $S_3$ is the symmetric group of
degree 3. 
Since $S_3$ is not abelian, $\mathbb{Z}$ is not finite, and the subgroup of any finite group is finite, 
the group $W$ is not RF.
Clearly, $W= \prod_{i \in \mathbb{Z}} S_3 \rtimes \mathbb{Z}$, where $\mathbb{Z}$ and $\prod_{i \in \mathbb{Z}} S_3$
are residually finite.
[1] K. W. Gruenberg, Residual properties of infinite soluble groups}, 
Prec. London Math. Soc., Ser. 3, 7 (1957), 29--62.