The gemara says that in a mezuzah, the break between שמע and והיה אם שמוע should really be a closed break (s'tuma), [because that's how it is in the Torah.]
Rashi explains that ובשעריך at the end of the first section שמע is followed by a s'tumah.
The other way to explain it would be the opposite: it should be a s'tumah because the beginning of והיה אם שמוע has a s'tumah - which is also true. That is actually the way that the poskim are all explaining things in Orach Chaim 32. That is presumably why they hold (Rambam, Rosh) that the break between והיה כי יביאך and שמע in tefillin is a p'sucha - that's how שמע begins, even though והיה כי יביאך ends in a s'tumah. (Our gemara is talking about mezuzah, not tefillin.)
The gemara continues, Or maybe it should be an open break (p'sucha), since the sections are not next to each other in the Torah. Says Rashi, therefore we make them p'suchos.
The simple understanding seems to be that a p'sucha is a more profound break - larger - than a s'tumah. Therefore, since they are far apart, a p'sucha becomes the right choice.
I saw in the Aruch Hashulchan (O"H 32), though, that he had a different understanding. He says that since they are far apart, it doesn't really matter so much what kind of break there is.
As a result, he says further that the break between והיה כי יביאך and שמע also doesn't matter so much b'dieved if it was made a s'tumah instead of a p'sucha, since they are also far apart in the Torah. According to the first understanding, that doesn't make sense: a s'tumah is even less appropriate than a p'sucha if the two sections are far apart.
Rashi explains that ובשעריך at the end of the first section שמע is followed by a s'tumah.
The other way to explain it would be the opposite: it should be a s'tumah because the beginning of והיה אם שמוע has a s'tumah - which is also true. That is actually the way that the poskim are all explaining things in Orach Chaim 32. That is presumably why they hold (Rambam, Rosh) that the break between והיה כי יביאך and שמע in tefillin is a p'sucha - that's how שמע begins, even though והיה כי יביאך ends in a s'tumah. (Our gemara is talking about mezuzah, not tefillin.)
The gemara continues, Or maybe it should be an open break (p'sucha), since the sections are not next to each other in the Torah. Says Rashi, therefore we make them p'suchos.
The simple understanding seems to be that a p'sucha is a more profound break - larger - than a s'tumah. Therefore, since they are far apart, a p'sucha becomes the right choice.
I saw in the Aruch Hashulchan (O"H 32), though, that he had a different understanding. He says that since they are far apart, it doesn't really matter so much what kind of break there is.
As a result, he says further that the break between והיה כי יביאך and שמע also doesn't matter so much b'dieved if it was made a s'tumah instead of a p'sucha, since they are also far apart in the Torah. According to the first understanding, that doesn't make sense: a s'tumah is even less appropriate than a p'sucha if the two sections are far apart.