Reading the proof of the Hales-Jewett theorem the author defines $W_L$ as the set of finite words over some alphabet $L$, $W_{L_v}$ as the set of variable-words over $L$, i.e. finite words over $L \cup \{v\}$ where $v \notin L$ and $v$ occurs at least once, $S = W_L \cup W_{L_v}$ and the substitution map from $S$ into $W_L$ obtained by replacing every occurrence of $v$ in the word by some $\lambda \in L$

Consider $(S, ^\frown)$ as a discrete topological space with the concatenation operation and let $\left(\beta S, ^\frown \right)$ be the space of ultrafilters over $S$ (the Stone–Čech compactification of $S$) with the operation given by $$\mathcal{U} ^\frown \mathcal{V} = \left\{ A \subseteq S | \left\{x \in S | \left\{y \in S | x ^\frown y \in A \right\} \in \mathcal{V} \right\} \in \mathcal{U} \right\}$$

Let $S_{L}^{*} = \left\{\mathcal{U} \in S^{*}: W_{L} \in \mathcal{U}\right\}$ and $S_{L}^{*} = \left\{\mathcal{U} \in S^{*}: W_{L v} \in \mathcal{U}\right\}$

at the beginning of the proof the author asserts:

Each letter $\lambda \in L$ determines the substitution map $x \mapsto x[\lambda]$ from $W_{L v} \cup W_{L}$ into $W_{L},$ which is clearly the identity on $W_{L}$ and which extends to a continuous homomorphism $\mathcal{U} \mapsto \mathcal{U}[\lambda]$ from $S_{L v}^{*} \cup S_{L}^{*}$ into $S_{L}^{*}$, which is the identity on $S_{L}^{*}$

I'm assuming that the extension is given by the universal property of the Stone–Čech compactification of $S$ since you can suppose that the substitution map is continuous and has domain in $S$ and codomain in $\beta S$. I can easily verify that the extension is a continuous function that maps $S_{L v}^{*} \cup S_{L}^{*}$ into $S_{L}^{*}$ and that it is the identity on $S_{L}^{*}$ using the fact that the extension given by the Stone–Čech compactification is

$$ \mathcal{U}[\lambda] = \left\{ B \subseteq S | \exists A \in \mathcal{U} \left( A[\lambda] \subseteq B \right) \right\}$$

I've been trying to prove that the extension is a homomorphism using the above equality but it gets very cumbersome and it is not clear how to prove it, I know that one inclusion would prove the equality (since they are ultrafilters) but i can't prove either of the two so I think that is not the way to prove it, a hint would help me a lot