Associativity in forming Disjoint Unions Let $X'$ be a set and let $\{X_{\alpha}\}_{\alpha \in A}$ be an indexed collection of sets. We can form the disjoint union $$\bigsqcup_{\alpha \in A} X_{\alpha} = \left\{(x, \alpha) \ | \ \alpha \in A \ \text{and } \ x \in X_{\alpha}\right\}.$$
Now my question is what does $X' \sqcup \left(\bigsqcup_{\alpha \in A} X_{\alpha}\right)$ equal (as a set?), because based on the definition of the disjoint union I see two approaches to form the disjoint union of the above. 
Approch 1
Set $X_1 = X'$ and $X_2 = \bigsqcup_{\alpha \in A} X_{\alpha}$, and let the indexing set $I = \{1, 2\}$. Then $$\bigsqcup_{i \in I} X_i = X' \sqcup \left(\bigsqcup_{\alpha \in A} X_{\alpha}\right) = \left\{(x, i) \ | \ i\in I \ \text{and } \ x \in X_{i}\right\}$$
Now let $\phi_i : X_i \to \bigsqcup_{i \in I}X_{i}$ be the canonical embedding defined by $\phi_i(x) = (x, i)$. Now pick $p \in X_2 = \bigsqcup_{\alpha \in A} X_{\alpha}$, then we have $p = (q, \alpha)$ for some $q \in X_{\alpha}$ and $\alpha \in A$. Then $\phi_2(p) = ((q, \alpha), 2)$ and for $p \in X_1 = X'$ we have $\phi_1(p) = (p, 1)$. This doesn't seem desirable and I think it defeats the purpose or the point of having the disjoint union, but it seems to be logically correct (I think) based on the the definition of a disjoint union  above. 
Approach 2
On the other hand we can extend the indexing set $A$ by setting $X^{'} = X_{\beta}$ and setting a new indexing set to be $A' = A \cup \{\beta\}$ and then we'd have $$X' \sqcup \left(\bigsqcup_{\alpha \in A} X_{\alpha}\right) = \bigsqcup_{\alpha \in A'} X_{\alpha} = \left\{(x, \alpha) \ | \ \alpha \in A' \ \text{and } \ x \in X_{\alpha}\right\}$$
Again let  $\phi_{\alpha} : X_{\alpha} \to \bigsqcup_{\alpha \in A'}X_{\alpha}$ be the canonical embedding defined by $\phi_{\alpha}(x) = (x, \alpha)$. But now when we pick $q \in X_{\alpha}$ for some fixed $\alpha \in A'$ we have $\phi_{\alpha}(q) = (q, \alpha)$ and for $p \in X_\beta$ we have $\phi_{\beta}(p) = (p, \beta)$. This seems to be desirable for the disjoint union because we only have an ordered pair, instead of a $3$-tuple above, but I don't think that it is logically sound.

Which of the approaches above is correct? Also I think that the main reason for the discrepency is that I have probably failed to take assosciativity into account for approach $2$ above, for example I'm assuming approach $2$ holds if we have $$X' \sqcup \bigsqcup_{\alpha \in A} X_{\alpha}$$
So with regards to assosciativity, does it hold that for sets, $X, Y, Z$ we have $X \sqcup (Y \sqcup Z) \neq (X \sqcup Y) \sqcup  Z$? That may possibly explain the issue I'm having. 
Also it should be noted that sometimes authors use the brackets $( \cdot )$ not for assosciativity but to enclose a complicated expression for a set so my pedantic issues above may not even be relevant.
 A: You are right that these two approaches produce sets that are strictly speaking not identical.
We usually don't care about this, because there is an obvious bijection between the two outcomes. And most situations where we want to speak about "disjoint union" as a set operations at all are ones where we are satisfied with only speaking of the results "up to isomorphism" anyway.
As such, neither of the approaches would usually be considered "more correct" than the other.

Traditionally, how to go about not caring about such differences has been something that students of set theory have been expected to develop an intuition about on their own, or "by osmosis". In recent decades category theory has provided a conceptual framework for understanding what's going on in more systematic terms.
Within the last decade homotopty type theory has become a hot research area, which -- if my imperfect understanding is not too far off -- is partially motivated by finding a foundation where not caring about these natural isomorphisms is "built into the logic" in the sense that moving between them is mostly implicit while still being founded on a precisely rigorous underlying theory that allows, say, machine-verifiable proofs.
A: (The first half of this answer is thanks to a friend of mine, but I will post it here for the sake of completeness and to help others who may have also had this same problem)
Firstly let me mention something category theory. Definitions in category theory hardly ever are well defined up to equality, but they are defined up to isomorphism. In the above question, both of the approaches I used give the same thing up to isomorphism.
More concretely what this means is that in the category Set, isomorphisms between sets are bijections and one can show that there exists a bijection between the above two sets, so they are isomorphic (see below for a proof).
In this case even binary disjoint unions are not well defined, however they are well defined up to isomorphism. What do I mean by this? I mean the following; no matter how you define the disjoint union (i.e. no matter which index set you use) the resulting set you get will be isomorphic (bijective) to the resulting set you get from any other method (i.e. any $2$ methods will always result in sets for which a bijection can be constructed between them).
With regards to assosciativity, the disjoint union is not assosciative, but up to isomorphism it is assosciative. That is for sets $X, Y, Z$ it may be the case that $(X \sqcup Y) \sqcup Z \neq X \sqcup (Y \sqcup Z)$, but there will always exist a bijective function $f : (X \sqcup Y) \sqcup Z \to X \sqcup (Y \sqcup Z)$
Another important observation is that for sets $A, B$ $A \sqcup B$ is dependant on the index set you use, for axample you could use any of the following indexing sets $I_1 = \{1, 2\}$ or $I_2=\{99, 100\}$ or even $I_3 = \{\Delta, \blacklozenge\}$. The key thing to note is that all of these index sets are isomorphic in the category Set, so any choice of them would yield the same disjoint union up to isomorphism. 
For example, let $A \sqcup_1 B$ denote the disjoint union of $A$ and $B$ over the indexing set $I_1$. Then put $X_1 = A$ and $X_2 = B$. Then $\Omega =\bigsqcup_{i \in I_1} X_i = \{(x, i) \ | x \in X_i \text{ and } i \in I_1\}$ contains elements of the form $(x, 1)$ for $x \in A$ and elements of the form $(x, 2)$ for $x \in B$. 
Now let $A \sqcup_2 B$ denote the disjoint union of $A$ and $B$ over the indexing set $I_3$. Then put $X_{\Delta} = A$ and $X_{\blacklozenge} = B$. Then $\Psi = \bigsqcup_{i \in I_2} X_i = \{(x, i) \ | x \in X_i \text{ and } i \in I_2\}$ contains elements of the form $(x, \Delta)$ for $x \in A$ and $(x, \blacklozenge)$ for $x \in B$. Observe that $\Omega$ is isomorphic to $\Psi$ are there exists an obvious bijection between them, due to the fact that their indexing sets are isomorphic (bijective).
Another important example is that if $A, B$ are sets again over some indexing set $I$, we have $A \sqcup B \neq B \sqcup A$ (in terms of the indexing set, this commutativity issue just means that we are swapping the two indexes on $A$ and $B$). However it certainly holds that $A \sqcup B \cong B \sqcup A$, where $\cong$ denotes the isomorphism (bijection) between $A \sqcup B$ and $B \sqcup A$. In other words there will always exist a bijection between $A \sqcup B$ and $B \sqcup A$, so $A \sqcup B$ and $B \sqcup A$ are isomorphic or equivalent in the category Set, but they are not equal.

Proof: Let $$\Phi = \bigsqcup_{i \in I} X_i = X' \sqcup \left(\bigsqcup_{\alpha \in A} X_{\alpha}\right) = \left\{(x, i) \ | \ i\in I \ \text{and } \ x \in X_{i}\right\}$$ and let $$\Gamma = X' \sqcup \left(\bigsqcup_{\alpha \in A} X_{\alpha}\right) = \bigsqcup_{\alpha \in A'} X_{\alpha} = \left\{(x, \alpha) \ | \ \alpha \in A' \ \text{and } \ x \in X_{\alpha}\right\}$$ Note that $\Phi$ is the set from Approach 1 and $\Gamma$ is the set from Approach 2. We now construct a bijection between $\Phi$ and $\Gamma$. Firstly note that $\Phi = \phi_1[X_1]  \cup \phi_2[X_2] = \phi_1[X'] \cup \phi_2\left[\bigsqcup_{\alpha \in A} X_{\alpha}\right]$, so $\Phi$ decomposes through the embeddings (this actually holds for any disjoint union). Define a function $f : \Phi \to \Gamma$ by $$f(x, i) =  \begin{cases}                     
                     \phantom{-}(x, \beta) & \text{if }  \ \ i = 1 \\
\phantom{-}x & \text{if } \ \ i= 2  \\
                 \end{cases}$$
To see what this function does, pick $(x, i) \in \phi_2[X_2]$. Then $x = (q, \alpha)$ for some $q \in X_{\alpha}$ and some fixed $\alpha \in A$, and furthermore $i = 2$. Then for this $(x, i) \in\phi_2[X_2]$ we have $f(x, i) = f\left((q, \alpha), 2\right) = (q, \alpha) \in \Gamma$. Now pick $(x, i) \in \phi_1[X_1]$, we have $x = p$ for some $p \in X' = X_1$ and moreover $i = 1$. Then for this $(x, i) \in \phi_1[X_1]$ we have $f(x, i) = f(p, 1) = (p, \beta) \in \Gamma$.
We claim that $f$ is a bijection. 
We first show surjectivity. Suppose $f$ was not surjective, then there would exist some element $p \in \Gamma$ such that $f(x, i) \neq p$ for any $(x, i) \in \Phi$. Note that $p$ is either of the form $p = (x, \beta)$ for some $x \in X_{\beta} = X'$ or $p = (x, \alpha)$ for some $x \in X_{\alpha}$ and some fixed $\alpha \in A$, so there are two cases to examine.
Case 1. Suppose $p = (x, \beta)$ for some $x \in X_{\beta} = X'$. Since $x \in X' = X_1$, we have $\phi_1(x) = (x, 1) \in \Phi$. Then $f(x, 1) = (x, \beta) = p$ which is a contradiction.
Case 2. Suppose $p = (x, \alpha)$ for some $x \in X_{\alpha}$ and some fixed $\alpha \in A$. We have that $(x, \alpha) \in \bigsqcup_{\alpha \in A} X_{\alpha} = X_2$, hence $\phi_2\left((x, \alpha)\right) = ((x, \alpha), 2) \in \Phi$. Finally $f((x, \alpha), 2) = (x, \alpha) = p$, a contradiction.
We now show injectivity of $f$. Analyzing this by cases would be painstaking, so to simplify the process we first show that no two elements in $\Phi$ having different second entries (in the $2$-tuple) can me mapped to the same point in $\Gamma$ by $f$, then we show that no two elements in $\Phi$ having different first entries but the same second entry (in the $2$-tuple) can be mapped to the same point in $\Gamma$ by $f$.
So to that end suppose there was a $l' \in \Gamma$ such that $f(x, 1) = f(x, 2) = l'$ for $(x, 1), (x, 2) \in \Phi$. Since $f(x, 2) = l'$ we have $x = l'$ and as a result we'd have $l' \in X_1$ and $l' \in X_2$, so that $\phi_1(l') = (l', 1) \in \Phi$ So we then have $f(l', 1) = (l', \beta) = l' \in \Gamma$ and $l' \neq (l', \beta)$ so we arrive at a contradiction. 
Finally suppose now that for some $i \in \{1, 2\}$ there existed a $p \in \Gamma$ such that  $f(x_1, i) = f(x_2, i) = p$ for some $x_1 \neq x_2$. Again there are two cases to examine.
Case 1. If $i = 1$, then $f(x_1, 1) = x_1 = p$ and $f(x_2, 1) = x_2 = p$, but $x_1 \neq x_2$ so we have $p \neq p$, a contradiction.
Case 2. If $i = 2$, then $f(x_1, 2) = (x_1, \beta) = p$ and $f(x_2, 2) = (x_2, \beta) = p$ but $(x_2, \beta) \neq (x_1, \beta)$ because $x_1 \neq x_2$ so again $p \neq p$, a contradiction.
We have thus shown that $f$ is both surjective and injective and hence bijective. $\square$
