# Confusion related to a property of languages on some alphabet V

I came across this relation betwen tww sets of languages formed from the alphabet V.

A,B

The relation is

$$A^*\cup B^* =((A\cup B)^*)^*$$

I am confused how this is derived. Any pointer?

-

It is not true in general, for example take $A=\{a\},B=\{b\}$.

$A^*\cup B^*=\{a\}^*\cup\{b\}^*$ - the language of all words that have only $a$'s in them or only $b$'s in them (including only zero $a$'s i.e $\epsilon$ is also in this language)

$A\cup B={a,b}\implies (A\cup B)^*=\{a,b\}^*=(\{a,b\}^*)^*$ - and this is the language of all words over $\{a,b\}$ and it has, for example, the word $ab$ that is not in $A^*\cup B^*$

-
It’s not generally true that $A^*\cup B^*=((A\cup B)^*)^*$. (I really don’t understand the function of the second star on the righthand side, since $(S^*)^*=S^*$ always.)
It’s clear that $A^*\cup B^*\subseteq(A\cup B)^*=((A\cup B)^*)^*$, but the reverse inclusion is not in general true. Suppose that $a\in A\setminus B$ and $b\in B\setminus A$. Then $ab\in(A\cup B)^*$, but $ab\notin A^*\cup B^*$.