The Mishna 38a cited a machlokes between R. Eliezer and the Rabbonon regarding Yom Tov and Shabbos that are back to back, whether they are regarded as one kedusha (one long 48hr day), or two. In that context there is no safeik, both days are kodesh. The machlokes is only whether the two kedushas remain independent or whether they merge together to be one. It is also not clear whether they are arguing on a d'oraysa level, or a d'rabonon level. It is possible that m'doraysa everyone views it as two separate days, but the Rabbonon consider the kedusha to be merged into one for the purpose of eiruv. The Rabbonon hold that we consider it a safeik and one would need to be machmir that it is one kedusha for the purpose of not making an eiruv in an opposite direction each day, and be machmir that it is two kedushos to require that the eriuv be in tact during the bein hashmashos of y.t. ending going into shabbos to permit travel on shabbos.
The Mishna on 39a has a discussion regarding Rosh Hashana whether we view it as one kedusha or two. The term two kedushos in that context means something different than it does by y.t. and shabbos that are back to back. There are no 2 kedushos regarding R.H., it is a one day yom tov. The concept of 2 kedushos essentially means to view the two days as a safeik where one day is Y.T. and the other is not, whereas the concept of one kedusha means to view it as one long day of kedusha m'drabonon. The rationale to view it as one long kedusha is explained by the gemara in Beitza and R.H. (and rashi here). Due to the mess up of the shir of the afternoon korban tamid, chazal instituted that they would not accept eidim after mincha time. Therefore, those who weren't close enough to know what was going on the the Beis din would have only 2 possibilities, 1. Eidim came the first day early enough to make it R.H. so that the first day was Y.T. and not the second. 2. Eidim didn't show up by the allotted time thereby forcing chazal to make R.H. on the second day, yet maintaining the remainder of the first day with the status of Yom Tov regarding melacha. Being that the second possibility is essentially a Rabbinic institution to stretch the kedusha of the second day back into the first, it is viewed as one kedusha.
We pasken like R. Yossi who is the לא הודו לו חכמים of the mishna that hold it is one kedusha. This is evident from the Shulchan Aruch (600, 1) who paskens that by Rosh Hashana if an egg is laid on day one it cannot be used on day two, similarly if a deer is trapped on day one it cannot be shechted on day two. That is because we consider the kedusha to be one kedusha and not a safeik. However, it is not clear whether only we pasken like R. Yossi to be machmir for one kedusha and not allow eiruvei techumin in separate directions for the two days, or whether we are even meikel for one kedusha thereby permitting one to travel the second day of R.H. even if the eiruv were eaten prior to the bein hashmashos going into that day. It would seem more logical that we are only machmir for one kedusha, but even R. Yossi should conclusively consider it one kedusha since in the time of the mikdash there was also the possibility that eidim would have come on time thereby making the first day yom tov. However, the Rashba (avodas hakodesh, eiruv techumin 18) states explicitly that if the eiruv is eaten before the bein hashmashos of the end of day way and start of day two, one can still rely on it on day two. The Rambam (Hil. Eiruvin 8, 8) also seems to hold that by R.H. the eiruv only needs to be there the first bein hashmashos, not the second.
If it is indeed true that the Rambam and Rashba hold that the two days are considered one kedusha even to be lenient, it should not only impact eiruv techumin but even impact the ability to cook and do other melacha on one day of R.H. for the next. Yet, in Shulchan Aruch (O.C. 103, 1) the mechaber paskens that it is forbidden to cook from one day of Y.T. for the next, even by two days of Rosh Hashana. Why? The Gaon Yaacov in explaining the opinion of the Rambam and Rashba writes that their opinion only makes a difference in the context of eiruv. The only two possibilities are either that it is one kedusha, or that the first day is Y.T. and not the second. There is no possibility after the takana not to accept eidim that the second day has a kedusha that is separate from the first. Therefore, it is sufficient to leave an eiruv by the bein hashmashos of the first day, even if it isn't there by the bein hashmashos of the second day, one can travel since there is no possibility that the second day has kedusha and not the first. But, in the context of cooking and baking from one day to the next, regardless there remains the possibility that the first day is Yom Tov and one is essentially cooking on Y.T. for the next day. Nowadays when we have a fixed calendar and the first day is definitely Y.T. from which we count Yom Kippur, it is certainly forbidden to cook on the first day for the second. The Biur Halacha (103, d.h. v'afilu) cites the Magen Avrohom who says exactly that - the issur to cook on day one for day two goes even according to the Rambam. However, the Gr"a seems to say that this issue is dependent on the machlokes between the Rambam and other Rishonim. The Biur Halacha doesn't understand the approach of the Gr"a based on a similar logic to the Gaon Yacov - the first day is definitely Y.T. on a Torah level, so how can one possibly cook on Y.T. for after Y.T.? Perhaps the Gr"a holds that since הואיל can be used to permit cooking from yom tov for a weekday, as the gemara in pesachim 46a uses it, on a d'rabonon level we can rely on the kedusha achas concept to allow cooking from one day to the next. Based on this approach, even the Rambam will only permit cooking relying on הואיל and therefore insist that the food be ready to be eaten before nightfall, and not just rely on the kedusha achas to permit an issur d'oraysa.
Regarding the bracha of shehechiyanu, the Shulchan Aruch (600, 2) holds that even in the absence of a fruit on which to make shehechiyanu, one would make shehechiyanu on the second day of Rosh Hashana. The difficulty with this is that since we pasken that it is a kedusha achas, at least to be machmir as we find by the beitzah and by the trapping, we shouldn't be making shehechiyanu either? The M.B. deals with this by simply saying that although it is considered one kedusha, it is still two separate days and therefore fit for a new shehechiyanu. I would like to suggest another approach as to why we make shehechiyanu even if it is technically kedusha achas. On the side of kedusha achas, the primary day of Yom Tov will still be the second, not the first. Meaning, the second day will be the Y.T. on a Torah level from which we count Yom Kippur, and the first day is only a Rabbinic implemented kedusha כי היכי דלא לזלזולי ביה. Therefore, it makes sense that chazal tell us to make shehechiyanu on the first out of safeik that maybe that day is Y.T. and on the second because that may be the primary day of Y.T.