Checking for a classmate. Here is his proof.
Proof: Let $C$ be the set of chains(linearly ordered subsets) in $X$. Pick an $A\in C$ where $A$ is not necessarily a maximal chain. Define $S:=\{\beta\in C:A\subseteq\beta\}$. Then $\bigcup S$ is a maximal chain in $X$. EDIT: I think Axiom of Choice is used in picking elements of $S$.
I feel that one reason this might be incorrect is $S$ might not have a maximal element...?
Suppose the domain of $A$ is $\emptyset.$ Then $S=C,$ but $\cup C$ is not a chain in $X$ unless $X$ has at most $1$ member, because if $x,x'\in X$ with $x\ne x'$ then there exist two incompatible linear orders on $\{x,x'\}.$
Any $c\in C$ is equal to $(S_c,<_c)$ where $S_c\subset X$ and where $<_c$ is a linear order on $S_c.$ For $c,d\in C$ let $$c<^*d \iff (S_c\subsetneq S_d\land \forall x,y\in S_c\;(x<_cy\iff x<_d y)).$$
For any $a\in C$ let $F(a)=\{a\}\cup \{c\in C:a<^*c\}.$
Observe that $<^*$ is transitive and irreflexive on $F(a)$ and that if $B$ is a non-empty $<^*$ chain of members of $F(a)$ then $\cup B \in F(a),$ and $\cup B$ is a $<^*$-upper bound for $B.$ And that $F(a)\ne \emptyset$, as $a\in F(a)$.
So by Zorn's Lemma there exists $c\in F(a)$ which is $<^*$-maximal among members of $F(a).$ Then it is almost trivial to show that $S_c=X$, so $c$ is a maximal member of $C$.
That is, if $X$ has a subset $S_a$ that can be linearly ordered then any linear order on $S_a$ can be extended to a linear order on $X.$
Since we could take $S_a=\emptyset,$ we also find that every $X$ (and, a fortiori, every $S_a\subset X$) can be linearly ordered.
BTW, it has been shown that, in the absence of Choice (Zorn), the axiom that every set can be linearly ordered does $not$ imply the axiom of Choice.