So far my proof is as follows:
We first show $\left(\bigcup\limits_{i=1}^{\infty} A_{i}\right) \cap B \subset \bigcup\limits_{i=1}^{\infty} (A_{i}\cap B)$. Take $x \in \left(\bigcup\limits_{i=1}^{\infty} A_{i}\right) \cap B$. Then, $x \in \bigcup\limits_{i=1}^{\infty} A_{i}$ and $x \in B$. This means $x \in A_1$ and $B$ or $x \in A_2$ and $B$ or $x \in A_3$ and $B$, etc. So, $x \in \bigcup\limits_{i=1}^{\infty} (A_{i}\cap B)$.
The converse has similar reasoning as above, only in the reverse order. I'm not sure if my proof is thorough enough.
Seems fine, though I will write it more compactly.
$$x \in \left( \bigcup_{i=1}^\infty A_i\right) \cap B$$
$$\iff x \in \left( \bigcup_{i=1}^\infty A_i\right) \land x \in B$$
$$\iff \exists i \in \mathbb{N}, x \in A_i \land x \in B $$
$$\iff \exists i \in \mathbb{N}, x \in A_i \cap B$$
$$\iff x \in \left(\bigcup_{i=1}^\infty A_i \cap B\right)$$