My question is about a detail in the proof of Theorem 24.8 in Abstract Alebra by Saracino. Here's the theorem (the part where I have a question on is underlined in red):
Why does $E = F(a_1,...,a_k)$ imply that $\varphi(E) \subseteq E$?
My intuition is that we can obtain a basis for $E$ over $F$ in terms of powers of the $a_i$'s, with coefficients from $F$, and then show that when $\varphi$ is applied to any linear combination of powers of the $a_i$'s with coefficients from $F$, we get an element in $E$. Is this the right idea? Or is there a simpler way?
One problem with my idea is that I don't know how to write a basis for $E$ over $F$ explicitly in terms of $a_1,...,a_k$. Is there a formula for a basis of $E$ over $F$ that I could use, or would that be more tedious than its worth?

If $E=F(a_1,\ldots a_k)$ then $\varphi(E) = F(\varphi(a_1), \ldots, \varphi(a_k))$. As $\varphi(a_j) = a_i$ for some $a_1 \in \{a_1,\ldots, a_k)$, this gives $\{\varphi(a_1), \varphi(a_2), \ldots, \varphi(a_k) \}$ $\subseteq$ $\{a_1,a_2,\ldots, a_k\}$ which in turn gives $$\varphi(E) = F(\varphi(a_1), \ldots, \varphi(a_k)) \subseteq F(a_1,\ldots, a_k) = E,$$ which is what you want.