If $X$ is well-ordered then $X\cup \left\{ \infty \right\}$ is well-ordered. Note that $\infty$ is a new element not in $X$, by putting the element $\infty$ to the very end of $X$ we obtain a new set $X\cup \left\{ \infty \right\}$.

Lemma. If $X$ is well-ordered then $X\cup \left\{ \infty \right\}$ is well-ordered.

Proof-trying. Assume $X$ is well-ordered. Let $A$ be a nonempty subset of $X$. Then, since $X$ is well-ordered then $A$ has a least element, say $a_1$. Since $A\subseteq X\cup\left\{ \infty \right\}$ then $ X\cup\left\{ \infty \right\}$ has a least element,that is $a_1$. Hence, $ X\cup\left\{ \infty \right\}$ is well-ordered.

Can you check my proof-trying?
The proof is sort of correct. I mean, you are on the right track, but you haven't proved that any subset of $X\cup\{\infty\}$ has a least element. Let's make it fully correct.
Recall that a totally ordered set $X$ is well ordered if every nonempty subset of $X$ has a least element.
Pick any nonempty subset $A\subseteq X\cup\{\infty\}$. Then there are two options:

$\infty\not\in A$. Then $A\subseteq X$ so $A$ has a least element because $X$ is well ordered.
$\infty\in A$. Consider $B=A\backslash\{\infty\}$. If $B=\emptyset$ then $A=\{\infty\}$ contains exactly one element so $\infty$ is the least element of $A$. So assume that $B\neq\emptyset$. Since $B\subseteq X$ then $B$ has the least element. Now by definition $x&lt;\infty$ for any $x\in X$. Obviously the least element of $B$ also satisfies this so it is a least element of $A$ as well since $A=B\cup\{\infty\}$.

And that's pretty much it.
Without loss of generality, X is a von-Neumann ordinal and infinity is X. X U {X}=X+1 is an ordinal, thus well-ordered.