4 added 189 characters in body

Here is an answer $\mathbf{if}$ $1\in X$:

Denote by $H$ the subgroup of $G$ being generated by $X$.

What you want is to show that $H=X^n$, which amounts to see that any element of $H$ can be written as a product of at most $n$ elements of $X$.

This follows from the fact that the size of $H$ is at most $n$:

We write an element $h$ of $H$ as a product of $m$ elements of $X$: $h=x_mx_{m-1}\dots x_1$ then we look at the elements $h_i=x_{i}\dots x_{1}$ obtained by the products of $i$ elements only. If $m>n$, there are two $h_i$'s which are equal, say $h_a=h_b$ with $a>b$. We replace $h_a$ with $h_b$ and can write $h$ with less elements.

$\mathbf{Edit}:$ If $1\notin X$, then $X^n$ is maybe not the group generated by $X$ (take for example the case where $X$ is a single element), but is in fact a subgroup, as Ilya showed.

3 added 49 characters in body

Here is an answer $\mathbf{if}$ $1\in X$:

Denote by $H$ the subgroup of $G$ being generated by $X$.

What you want is to show that $H=X^n$, which amounts to see that any element of $H$ can be written as a product of at most $n$ elements of $X$.

This follows from the fact that the size of $H$ is at most $n$:

We write an element $h$ of $H$ as a product of $m$ elements of $X$: $h=x_mx_{m-1}\dots x_1$ then we look at the elements $h_i=x_{i}\dots x_{1}$ obtained by the products of $i$ elements only. If $m>n$, there are two $h_i$'s which are equal, say $h_a=h_b$ with $a>b$. We replace $h_a$ with $h_b$ and can write $h$ with less elements.

2 added 306 characters in body

I am not sure that it is of the level of MO.

Denote by $H$ the subgroup of $G$ being generated by $X$. What you want is to show that $H=X^n$, which amounts to see that any element of $H$ can be written as a product of at most $n$ elements of $X$. Since

This follows from the order fact that the size of $H$ is at most $\le n$n$: We write an element$h$of$H$as a product of$m$elements of$X$:$h=x_mx_{m-1}\dots x_1$then we look at the elements$h_i=x_{i}\dots x_{1}$obtained by the products of$i$elements only. If$m>n$, there are two$h_i$'s which are equal, this is trivialsay$h_a=h_b$with$a>b$. We replace$h_a$with$h_b$and can write$h\$ with less elements.

1