You need the ring to be commutative for this. Since
$$
\sum_{i=1}^n r_ix_i=\sum_{i=1}^n x_ir_i
$$
it's immaterial if we denote the set by $RX$ or $XR$.
The proof needs two steps.
First step: $RX\subseteq\langle X\rangle$
If $x\in X$ and $r\in R$, then $rx\in\langle X\rangle$ because $x\in\langle X\rangle$. Therefore also finite sums $\sum_{i=1}^n r_ix_i$, for $r_i\in R$ and $x_i\in X$, belong to $\langle X\rangle$.
Second step: $\langle X\rangle\subseteq RX$
Let us prove that $RX$ is an ideal. Clearly $0\in RX$. Closure under sums is obvious. If $y=\sum_{i=1}^n r_ix_i\in RX$ and $r\in R$, then
$$
ry=r\Bigl(\,\sum_{i=1}^n r_ix_i\Bigr)=
\sum_{i=1}^n r(r_ix_i)=
\sum_{i=1}^n (rr_i)x_i\in RX
$$
Since, by definition, $\langle X\rangle$ is the intersection of all ideals of $R$ that contain $X$ and $X\subseteq RX$, we conclude $\langle X\rangle\subseteq RX$.