Tricks - Prove Homomorphism Maps Identity to Identity - Fraleigh p. 128 Theorem 13.12(1.)
Since $$\phi(e)=\phi(ee)=\phi(e)\phi(e),$$ you can cancel one of the $\phi(e)$ in $G'$, then leaving you with $e'=\phi(e)$.
The identity element $\iota$ in a group $H$ has the property (by definition) that $hh^{-1} = \iota$ for all $h\in H$. Therefore, in order to find out what the identity $e'$ of $G'$ is, one could write down $e' = \phi(a) ^{-1} \phi(a)$. This is essentially what they do. You could choose a specific $a$ if you wanted; for example, as janmarqz suggests you can use $a=e$.
By the looks of it, the only rules you know about $\phi$ are that $\phi(a) \phi(b) = \phi(ab)$. The simplest way to use this is to observe that because $a = ae$, we have $\phi(a) = \phi(ae) = \phi(a)\phi(e)$ - in other words to choose $b=e$. (Again, we could have chosen $a=e$ to make things even simpler.)
The intuition is "If $e$ doesn't do anything to an element of $G$, and $\phi(a)$ does the same sort of thing in $G'$ as $a$ does in $G$, then $\phi(e)$ must not do anything to an element of $G'$. Therefore it must be the identity."
Edit: Choosing a specific $a\in G$ is unnecessary so long as one is sure that it is possible to choose some $a\in G$. (To prove "There are two natural numbers whose difference is 0", one can just say "Take any number $n \in\mathbb N$; consider $n-n=0$. We are done", and not choosing some specific $n$ makes no difference.)
Without digging into any thing deep or complicated, you only have three pieces of knowledge:
- $e'$ is the only element that ever satisfies an equation in $G'$ of the form $e'x = x$ or $ye' = y$
- $e$ satisfies equations in $G$ of the form $ex = x$ and $ye = y$
- $\phi(xy) = \phi(x) \phi(y)$ (and similarly for products of more than two things)
By the first point, if you want to prove $\phi(e) = e'$, the only option we have (if we want to use these simple pieces of knowledge) is to find an equation $\phi(e)x = x$ or $y \phi(e) = y$. Trying to figure out how to use the other pieces of information to do this leads to a proof.
The proof could also have been derived from a simple approach of "I have facts, I'll do something with them and see if the result is useful". e.g. looking at the second and third points and seeing that you can combine them... so you do so, and see if the result is useful. (and it turns out to be exactly what you need to use the first point to complete the proof)