Elementary Set Theory , Proof involving partition I need to seek clarification for a formula involving the partition feature. Given that $A$ is a subset of $B:$
$$A\cup(B\setminus A) = B.$$
My trial: Let $x$ be an arbitrary object:
$$x \in A\cup(B\setminus A) \implies [x\in A] \lor [x \in (B\setminus A)]$$
$$ x \in (B\setminus A) \implies [x \in B]  \land [x\notin A] $$
That means that :
$$x \in A\cup(B\setminus A) \implies x \in A \lor [x \in B \land  x\notin A]$$
That is where I came to a dead end.
 A: Notice that
\begin{align*}
A\cup(B - A) = A\cup(B\cap A^{c}) = (A\cup B)\cap(A\cup A^{c}) = A\cup B
\end{align*}
Therefore $A\cup(B - A) = A\cup B = B$ iff $A\subseteq B$.
EDIT
Let us prove the implication $(\Rightarrow)$ first.
If $A\cup B = B$, then one has that
\begin{align*}
x\in A \Rightarrow (x\in A)\vee (x\in B) \Rightarrow x\in A\cup B = B \Rightarrow x\in B
\end{align*}
Therefore $A\subseteq B$. We may now prove that reverse implication $(\Leftarrow)$.
To begin with, notice the relation $B\subseteq A\cup B$ does always hold. Thus we have to prove that $A\cup B\subseteq B$.
Indeed, this is the case as the next reasoning proves:
\begin{align*}
x\in A\cup B \Rightarrow (x\in A)\vee(x\in B)
\end{align*}
If $x\in A$, then $x\in B$ because $A\subseteq B$. If $x\in B$, we are done.
Hence we have proven that $A\cup B = B$ iff $A\subseteq B$.
Hopefully this helps.
A: Just a correction, the statement you are trying to prove is only valid if and only if $A \subseteq B.$
Therefore, what you should try to prove is the following Theorem.
Theorem: Let $A,$ and $B$ be any sets. Hence $A\cup(B\setminus A) = B$ if and only if $A \subseteq B.$
Proof: $\implies.$ Suppose that $A \cup (B \setminus A) = B.$ Let $a \in A.$ Hence $a \in A \cup (B \setminus A).$ Then, by hypothesis, we have that $a \in B.$ Therefore $A \subseteq B.$
$\Longleftarrow.$ Suppose that $A \subseteq B.$ Let $x \in A \cup (B \setminus A).$ By definition of union of sets, we have that $x \in A$ or $x \in B \setminus B.$
Case $1:$ $x \in A.$ By hypothesis, we conclude that $x \in B.$
Case $2:$ $x \in B \setminus A.$ Hence $x \in B$ and $x \notin A.$ In particular, we have that $x \in B.$
In both cases, we deduce that $x \in B.$ Therefore $A \cup (B \setminus A) \subseteq B.$
Now, let $y \in B.$ We have to cases to consider, or $y \in A,$ or $y \notin A.$
Case $1:$ $y \in A.$ Hence $y \in A \cup (B \setminus A).$
Case $2:$ $y \notin A.$ Then $y \in B \setminus A.$ So we have that $y \in A \cup (B \setminus A).$
In both cases, we conclude that $x \in A \cup (B \setminus A).$ Therefore $B \subseteq A \cup (B \setminus A).$
Since $B \subseteq A \cup (B \setminus A) \subseteq B,$ we deduce by the definition of equality of sets, that $A \cup (B \setminus A) = B.$ $\square$
