I have tried to grasp topology homeomorphism. I have heard that such transformations preserve intersections and unions. I have tried to prove it myself and it came out that actually any transformation preserves unions and intersections.
$$f: X \to Y $$ $$U, V \subset X $$ $ f(U \cup V)= f(${$a\in X \mid a \in U \vee a \in V $}$) = ${$f(a)\in Y \mid a \in U \vee a \in V $}$ = ${$f(a) \in Y \mid a \in U $}$ \cup ${$ f(a) \in Y \mid a \in V $}$ = f(U) \cup f(V) $
$ f(U \cap V)= f(${$a\in X \mid a \in U \wedge a \in V $}$) = ${$f(a)\in Y \mid a \in U \wedge a \in V $}$ = ${$f(a) \in Y \mid a \in U $}$ \cap ${$ f(a) \in Y \mid a \in V $}$ = f(U) \cap f(V) $
It feels off, so I am here to check if there is a mistake. Otherwise I would be glad to hear explanation from another point of view.
The simplest counterexample that I could imagine is simply, choose $U,V$ to be non-empty disjoint subsets of some set $X$ and define
$ f:X\to \{1\} $
Then $ f(U\cap V) = f(\emptyset) = \emptyset$
But
$f(U)\cap f(V) = \{1\}$
As for where your proof went wrong, I think it is your mistake is quite instructive, you make the assertion that
$\{f(a)\in Y| a\in V \land a\in U\} \\ = \{f(a)\in Y|a\in U\} \cap \{f(a)\in Y|a\in V\} $
But the problem is that in general,
$\{g(x)\in S|\alpha(x)\}$
Is not well defined, so you cannot blindly apply the definition of the intersection.
The axiom of restricted comprehension in $ZFC$ guarantees that the object
$\{x\in S|\alpha(x)\}$
Always forms a set, but when you "apply" a function to the first appearance of $x$ in the above expression, there is no longer any axiom that guarantees that this is a set, and for good reason, in general, we cannot deduce what $x$ is if we only know what $f(x)$ is, and so there is no way to verify $\alpha(x)$. When can we deduce what $x$ is from $f(x)$ ? Precisely when $f$ is injective, and not surprisingly, the intersection property you were trying to prove is true precisely for injective functions.
The union property is true for any function, but again I would advise caution, and to rather use the formal definition of image,
$f(X) = \{y\in Y|\exists_{x\in X}[f(x)=y]\}$
When you are unsure