Prove: $f(\bigcup_{i\in I}A_i)=\bigcup_{i\in I}f(A_i)$
Let $y\in f(\bigcup_{i\in I}A_i)$ so by definition there is $x\in \bigcup_{i\in I} A_i:f(x)=y\in f(\cup_{i\in I}A_i)$ then by defintion of a union there is $i\in I$ such that $x\in A_i$
Now there is $i\in I$ such that $y=f(x)=f(A_i)\subseteq \bigcup_{i\in I}f(A_i)$
Let $y\in \bigcup_{i\in I}f(A_i)$ by definition of a union there is $i\in I$ such that $y\in f(A_i)$ then there is $i\in I$ and $x\in A_i$ such that $y=f(x)\in f(A_i)$
Now there is $i\in I $ such that $x\in A_i \subseteq \bigcup_{i\in I}A_i$ so $y=f(x)\in f(A_i) \subseteq f(\cup_{i\in I}A_i)$
Is it correct?
It is correct, but one of the inclusions has an easier proof: since, for each $i\in I$, $A_i\subset\bigcup_{i\in I}A_i$, you have$$(\forall i\in I):f(A_i)\subset f\left(\bigcup_{i\in I}A_i\right)$$and therefore$$\bigcup_{i\in I}f(A_i)\subset f\left(\bigcup_{i\in I}A_i\right).$$