This is the task im trying to solve:
Can someone please clarify this for me? I don't even know where to begin. If we are mapping from $G_i$, then what the hell is $g_j$ ? I assume an element of $G_i$. Then what is $g_i$ supposed to be? How are we even counting the index i?
I'm really confused on this.

Surely, it is a typo. The correct formula for $\phi_i$ should be $$\phi_i(g) = (e_1,\dots,e_{i-1},g,e_{i+1},\dots,e_n),$$ a kind of inclusion of each $G_i$ into the product $G_1 \times \cdots \times G_n$.