$(A)$
$ Y \to next = Y \to next \to next$
$X = Y \to next$
$(C)$
$temp = \text{(int *)(malloc(sizeof(int)))}$
$temp \to data = val$
$temp \to next = X$
$Y \to next = temp$
$Y = temp$
$(D)$
$temp = \text{(int *)(malloc(sizeof(int)))}$
$temp \to data = val$
$temp \to next = X$
$Y \to next = temp$
$X = temp$
$(E)$
$temp = X \to next \to data$
$X \to next \to data = X \to data$
$X \to data = temp$
Now, let's look at the Part $(B)$
Let’s copy the data of $X$ in $Y$ and then delete $X$.
$Y \to data = X \to data$
$Y \to next = X \to next$
$X = Y$
Now we need to point $Y$ to the previous node of the newly set $X$. How do we do that in constant time?
For that, we need to iterate starting from $X$ to the last node which will take $O(n)$ time where $n$ is the number of nodes in the list.
So, the answer should be $(B)$