I'm having trouble going to the 2nd to last line of (3.14),
http://incompleteideas.net/book/RLbook2020.pdf#page=81
$$ \require{enclose} \begin{aligned} v_{\pi}(s) & \doteq \mathbb{E}_{\pi}\left[G_{t} \mid S_{t}=s\right] \\ &=\mathbb{E}_{\pi}\left[R_{t+1}+\gamma G_{t+1} \mid S_{t}=s\right] \\ &=\sum_{a} \pi(a \mid s) \sum_{s^{\prime}} \sum_{r} p\left(s^{\prime}, r \mid s, a\right)\left[r+\gamma \mathbb{E}_{\pi}\left[G_{t+1} \mid \enclose{circle}[mathcolor="red"]{S_{t+1}}=s^{\prime}\right]\right] \\ &=\sum_{a} \pi(a \mid s) \sum_{s^{\prime}, r} p\left(s^{\prime}, r \mid s, a\right)\left[r+\gamma v_{\pi}\left(s^{\prime}\right)\right], \quad \text { for all } s \in \mathcal{S}, \end{aligned} $$
I don't understand where the red circled term comes from. Namely, where the $S_{t+1}$ comes from, since I was expecting an $S_t$ from the previous line.
Can you please explain? Thank you.