Let $x\in \bigcup_{i=1}^{n}A_{k_i}$. Then for some m, $x\in A_{k_m}$. But $ A_{k_m}$ is one of $A_1, \dots A_n$. So $x$ is in on of $A_1, \dots A_n. $ Hence $x \in\bigcup_{i=1}^{n}A_i$. We proved so far: $\bigcup_{i=1}^{n}A_{k_i}\subseteq\bigcup_{i=1}^{n}A_i$.
Similarly: $\bigcup_{i=1}^{n}A_i\subseteq \bigcup_{i=1}^{n}A_{k_i}$