Here is the quote from textbook Introduction to Set Theory by Karel Hrbacek and Thomas Jech.
Let $(A_1,<_1)$ and $(A_2,<_2)$ be linearly ordered sets and $A_1 \cap A_2=\emptyset$. The relation $<$ on $A=A_1 \cup A_2$ defined by $$a<b \text{ if and only if } a,b\in A_1 \text{ and } a<_1 b $$ $$\text{or } a,b\in A_2 \text{ and } a<_2 b $$ $$\text{or } a\in A_1,b\in A_2$$ is a linear ordering.
Proof. This is Exercise 5.6 in Chapter 2, so again we leave it to the reader.
The set $A$ is ordered by putting all elements of $A_1$ before all elements of $A_2$. We say that the linearly ordered set $(A,<)$ is the sum of the linearly ordered sets $(A_1,<_1)$ and $(A_2,<_2)$.
Notice that the order type of the sum does not depend on the particular orderings $(A_1,<_1)$ and $(A_2,<_2)$, only on their types (see Exercise 4.1). As an example, the linearly ordered set $(\Bbb Z,<)$ of all integers is similar to the sum of the linearly ordered sets $(\Bbb N,<^{-1})$ and $(\Bbb N,<)$ ($<$ denotes the usual ordering of numbers by size).
First, the authors define the $sum$ of $(A_1,<_1)$ and $(A_2,<_2)$ with the condition that $A_1\cap A_2=\emptyset$, but at the end they give an example of $(\Bbb Z,<)$, which is the sum of $\Bbb N,<^{-1})$ and $(\Bbb N,<)$. It's clear that $\Bbb N \cap \Bbb N=\Bbb N\neq \emptyset$.
Please help me reconcile this discrepancy!

If $A_1$ and $A_2$ are not disjoint, then choose $B_1$ and $B_2$ which are disjoint, and of the same cardinalities as $A_1$ ans $A_1$, and put orders on then so that $(B_1,<_1')$ is order-isomorphic to $(A_1,<_1)$ and $(B_2,<_2')$ is order-isomorphic to $(A_2,<_2)$. Then take the order-sum of the $(B_i,<_i')$.
This is a standard dodge in set theory, when you'd like disjoint sets, but don't actually have them. It's the sort of thing that causes advocates of category-theoretic foundations of maths to snigger.