Preimage of a homomorphism preserves the index? Let $G, H$ be groups and $K \leq H$. Also, $\phi : G \rightarrow H$ is a homomorphism.
Assume the following

*

*$|H : K| = 2$

*$\phi(G)$ is not contained in $K$ (i.e. $\phi(G) \nsubseteq K$)

From these assumptions, I want to show that $|G : \phi^{-1}(K)| = 2$.
From 1, let $\{K, aK\}$ be all the cosets of $K$.
Then
$$G = \phi^{-1}(K \cup aK) = \phi^{-1}(K) \cup \phi^{-1}(aK)$$
where $\phi^{-1}(K), \phi^{-1}(aK)$ are disjoint.
So it suffices to show that $g\phi^{-1}(K) = \phi^{-1}(aK)$ for some $g \in G$. This is where I am stuck.
I would appreciate any help on how to proceed (or different approach).
 A: Completing your approach. The point you are missing is that you can take $a$ to lie in $\phi(G)$. Indeed, since $\phi(G)\not\subset K$, there is a $g\in G$ such that $\phi(g)\notin K$. By $1.$, $K$ and $\phi(g)K$ are the two cosets of $K$, so you can take your $a$ to be $\phi(g)$. Now it will be easy to show that $\phi^{-1}(\phi(g) K)=g\phi^{-1}(K)$.
Different approach. What follows is probably an overkill, but sometimes it is nice to put things into a more general context.
Let $\phi:G\to H$ be a group morphism, let $K$ be a normal subgroup of $H$. Then $K\phi(G)$ is a subgroup of $H$ (since $K$ is normal in $H$), and $K$ is a normal subgroup of $K\phi(G)$. Let $f:g\mapsto G\to \overline{\phi(g)}\in  K\phi(G)/K.$ Then $f$ is surjective (why ?), and the kernel of $f$ is exactly $\phi^{-1}(K)$.
The first isomorphism theorem then yields $G/\phi^{-1}(K)\simeq K\phi(G)/K$ (*)
In particular, $[G:\phi^{-1}(K)]=[K \phi(G):K]$ (**)
Note that this is true in full generality. Now for your specific case, $K$ has index $2$ in $H$ , so it is a normal subgroup. Now, 1. and 2.  imply that $[K\phi(G):K]=2$. Indeed, by 1. it is at most $2$. By 2. , it is at least $2$ (since otherwise $\phi(G)\subset K\phi(G)=K$), so you are done.
Side remark. Using the second isomorphism theorem, (*) may be rewritten as $G/\phi^{-1}(K)\simeq \phi(G)/(\phi(G)\cap K)$.
All of this also shows that if $\phi:G\to H$ is a  surjective group morphism, then taking  preimages preserve the index of normal subgroups.
