Here is the question:
**My trial: **
1-reflexive . Assume that $a \in X$ as $[a,a] = \{a\}$ which is in $X$ then the relation is transitive.
2-Symmetric. I have a difficulty in this as $[a,b] \neq [b,a].$ could anyone help me in proving this?
3-Transitive.assume that $a \sim b $ and $b \sim c,$ we want to show that $a \sim c.$ by the first assumption $[a,b]$ is totally in $X$ and by the second assumption $[b,c]$ is entirely contained in $X$ then their union $[a, c]$ is entirely contained in $X$.
Could anyone help me in proving 2, please?

It's better formulated as $a \sim b$ iff $[\min(a,b), \max(a,b)] \subseteq X$. This will work regardless of order of $a,b$ as $\min$ and $\max$ are symmetric. As it stands it's confusing and misleading.