I see, I think I had the misunderstanding that something from A2 might close A1.
But I don't think that is an issue you technically need to wrap your head around.
Because the definition states: We define a set U to be open if for each point x in U there exists an open ball B centered at x...
Let x ∈ A1 ∪ A2 then x ∈ A1 or x ∈ A2
If x ∈ A1, as A1 is open, there exists an r > 0 such that B(x,r) ⊂ A1⊂ A1 ∪ A2 and thus B(x,r) is an open set.
Therefore A1 ∪ A2 is an open set.
How does this prove that A1 ∪ A2 is an open set. It just proved that A1 ∪ A2 contains an open set; not that...