I am having some trouble on understanding link-cut trees, so I need some help.

Suppose that we have nodes $$A, B, C, D$$ and we want to do the following operations:

However, when we draw preferred paths, I should get

Am I doing something wrong when doing access(X)?

I think you might be mixing up the represented tree, $R$, and the auxiliary tree representation of the represented tree, $T$.

Recall the definition of $LINK(v, w)$:

$link(v, w)$ - Makes vertex $v$ a new child of vertex $w$.

This happens in the represented tree. Then to keep the auxiliary representation consistent we make $w$ the left child of $v$ because they are keyed by their depth in the represented tree (i.e. left children are higher, right children are lower in the represented tree). So your proposed linking should happen like so:

1. $link(A, B)$ - Make $A$ the child of $B$ in $R$. Make $B$ the left child of $A$ in $T$ (assumptions are omitted).

1. $link(B, C)$ - Make $B$ the child of $C$ in $R$. Rebalance the splay tree in $T$ and make $C$ left child of $B$.

1. $link(C, D)$ - Similar to step 2.

Then we have the preferred path in the represented tree is simply $D \rightarrow C \rightarrow B \rightarrow A$.