I've been presented the following theorem:
Theorem: Every finite partial order $(X\leq_X)$ can be extended to $(X,\prec_X)$ such that $(X,\prec_X)$ is linear extension of $(X,\leq_X)$.
Proof. Let $(X,\leq_X)$ be a finite partial order. If $(X,\leq_X)$ is linear, then set set $\forall x,y\in X:x\prec_Xy\Leftrightarrow x\leq_Xy$ and we are done. So assume $(X,\leq_X)$ is not total (or linear), then there exists some $x,y$ such that $x\nleq y$ and $y\nleq x$ and $x\neq y$. That is, they are uncomparable. Now, for any $p,q\in X$, we set $$p\prec_Xq\text{ if } p\leq_X q\tag{i}$$ or $$p\leq_X x\wedge y\leq_X q\tag{ii}$$ Now, $\prec_X$ is an order extending $\leq_X$ and is also linear.
I am actually unable to grasp this somehow. Does this actually tell us, that we are able to choose the $p,q$ as we want? Is it our choice whether we set $p\prec_Xq$ or $q\prec_Xp$ as long as we don't break the (ii) rule? Maybe Let's work through an example and I would like a feedback on whether I am doing it right or now. Consider the ordering on finite set of the naturals: $X=\{2,3,4,5,6\}$ given by $$a\leq_Xb\Leftrightarrow a\mid b$$ $a$ is less than $b$ if $a$ divides $b$. So, for this case, the relation is given by follows: $$\leq_X=\{(2,2),(3,3),(4,4),(5,5),(6,6),(2,4),(2,6),(3,6)\}$$ and nothing else yet. Now, I wish to add all the remaining $7$ pairs to the relation (somehow). So, let's define a new relation $\prec_X$ and we first add the $3$ already comparable 2-tuples by $\leq_X$. Now, we see that for example elements $2$ and $3$ are not compared, so we set $3\prec_X 2$. Because there are no $(m,n)\notin \leq_X$ such that $3\leq_X m \wedge n\leq_X 2$.
Now, proceed to the pair $2,5$. We see that, again there is no $(m,n)\notin \leq_X$ such that both $5\leq_Xm \wedge n\leq_X 2$. So maybe we add $(5,2)$ to the list.
Now, $(2,6)$ is in the list, so let's go to $3,4$. In this case, if we add $(4,3)$ to the list, that breaks the transitive property, because $(3,2)$ is here and $(4,2)$ is not (and can't bee). So this is the case where we set $3\prec_X 4$ because $3\prec_X 2$ and $2\prec_X 4$.
Now... I would like not to make an essay from this... so do we always check for the elements whether there are some which would make the pair go from the transitive property (thus forcing us to have it the 1 way), if it is not the case, we are free to choose if $p\prec_X q$ or $q\prec_X p$, is that correct? And because it is a finite set, we are able to do so.
(I'm not using the the index $X$ for the order relations, as we are not changing that underlying $X$).
In any step, you take a set of 2 (up to now, using "$\le$") incomparable elements $\{x,y\}$, decide which one one you want to be smaller than the other from now on (that is the one denoted by $x$ in the definitions, the other is then obv. $y$), then apply the definitions (i) and (ii) to get an extension ("$\prec$") of the previous partial order ("$\le$").
What is not obvious is that $(X,\prec$) is a partial order (not necessarily a total order as you wrote in the question). You 'just' need to check the axioms of reflexivity, antisymmetry and transitivity. It's not hard, just leg work. If you know that, it clear that $(X,\prec$) is an extension of $(X,\le$), because of condition (i).
In your examples you seem to mix up the pairs $(x,y)$ and $(p,q)$. In your initial order 2 and 3 are not comparable (correct), so if you want to have $3 \prec 2$, you have to set $x=3$ and $y=2$ in the definitions, which means (ii) says
$$p \le 3 \land 2 \le q$$
The only possible choice for $p$ is $p=3$, and the only possible choices for $q$ are $q=2,4$ or $6$. That means that the partial order relation $\prec$ equals
$$\prec=\{(2,2),(3,3),(4,4),(5,5),(6,6),(2,4),(2,6),(3,6),(3,2),(3,4),(3,6)\}$$
We see that $2$ and $5$ are incomparable in this order, so we construct a new extension $\prec_2$ with $5 \prec_2 2$. Again we need to check condition (ii) for any new entries into the order relation, so we needs to check
$$p \prec 5 \land 2 \prec q$$
Again this means $p=5$ and $q=2,4,6$, so we get
$$\prec_2=\{(2,2),(3,3),(4,4),(5,5),(6,6),(2,4),(2,6),(3,6),(3,2),(3,4),(3,6),(5,2),(5,4),(5,6)\}$$
This is now an 'almost' total order, only 3 and 5 remain uncompareble in $\prec_2$ and creating $\prec_3$ that compares them should now be straightforward.
So you basically had it right, you add pairs of incomparable elements to the order and (ii) makes sure that the partial order axioms are true for the new order (mostly transitivity). Each newly constructed partial order is an extension of the previous one but has at least one pair of elements more comparable as the previous one ($x \prec y$).
Since we are talking about finite orders, this process must end, so at some time we get a partial order with no uncomparable elements, so a total order.