Let $C$ be a subgroup of a group $A$ such that $C\cong A/\{\pm1\}$ and $D$ be a subgroup of $B$ such that $D\cong B/\{\pm1\}$. Let $\pi:A\to B$ be a group homomorphism, and let $\pi$ induce a surjective group homomorphism (say) $\pi^*$ on the quotient groups. Now, clearly $C$ has index $2$ in $A$, $D$ has index $2$ in $B$, and $C$ is a subgroup of $\pi^{-1}(D)$. Then can we say that $\pi^{-1}(D)$ has index $2$ in $A$ as well? Eventually, I am trying to show that $C\cong\pi^{-1}(D)$. So, if my above argument is not correct then how can I show the desired isomorphism?
Edit: Let me mention the original groups and group homomorphism that I am working with. In the original problem $A=(\mathcal{O}/3^m)^{\times}$, $B=(\mathcal{O}/3)^{\times}$, where $\mathcal{O}=\mathbb{Z}[\sqrt{-3}]$ and $\pi:A\to B$ is defined as $a+b\sqrt{-3}+3^m\mathcal{O}\mapsto a+b\sqrt{-3}+3\mathcal{O}$.