I would like to get some feedback if this proof is rigorous and correctly written. And if not how should it be written. Where did I go wrong etc.
Def 1: $x \in A \cup B: \Leftrightarrow \forall x: x \in A$ or $x \in B$
Def 2: $f(A)=\{Y \in Y \mid \Rightarrow x \in X, y=f(x)\}=\{f(x): x \in A$}
let $f: X \rightarrow Y $ be a function.
Then $A, B$ $\subseteq X$.
Prove: $f(A \cup B)=f(A) \cup f(B)$
For all $y \in$ $f(A \cup B)$ then by Def 2, there exist $x \in A \cup B$ and by def 1 it follows that $x \in A$ or $x \in B$. with out the loss of generality assume that $x\in$ $A$, then by def 2 $y \in f(A)$ and it follows by def 1 that $y \in f(A) \cup f(B)$
Following answer I would need to prove the left implication:
lef $y \in f(A) \cup f(B)$, then by def 1. $Y \in f(A)$ or $Y \in \mathcal{C}(B)$ WLOG assume that $y \in f(A)$ then by def 2.
$\exists x: x \in A$ and by def 1 $x\in A \cup B$ which by def 2 then $y \in f(A \cup B)$