The Shulhan Aruch (Orah Haim 487:1) writes that when Yom Tob falls on Shabbat, a number of additions are made to the Amida prayer, in order that Shabbat is mentioned. For example, he writes that we recite, "…Et Yom Ha’manoach Ha’zeh Ve’et Yom…" adding the phrase "Yom Ha’manoach" ("the day of rest"). Our custom, though, is to recite "Yom Ha’Shabbat" instead of "Yom Ha’manoach." Additionally, we follow the practice to add the word "Be’ahaba" twice in the prayer when Yom Tob falls on Shabbat ("Va’titen Lanu Hashem Elokenu Be’ahaba Et Yom Ha’Shabbat Ha’zeh Ve’et Yom…Be’ahaba Mikra Kodesh").
In the conclusion of the middle Beracha of the Amida, which normally reads, "Mekadesh Yisrael Ve’hazmanim," we recite instead on Shabbat, "Mekadesh Ha’Shabbat Ve’Yisrael Ve’ha’zmanim." We mention Shabbat first, before "Ha’zmanim" ("the festivals"), because Shabbat occurs more frequently ("Tadir"), and is therefore given precedence.
This Halacha is based on the Gemara’s discussion in Masechet Besa (17), where we find a debate among the Sages regarding the text which one must recite in this concluding blessing when Yom Tob falls on Shabbat. Bet Hillel were of the opinion that one recites "Mekadesh Ha’Shabbat" just as on an ordinary Shabbat, but Rebbe disagrees, and maintains that one must recite, "Mekadesh Ha’Shabbat Ve’Yisrael Ve’ha’zmanim." The Gemara states unequivocally that Halacha follows the view of Rebbe, and thus we recite the lengthy text of "Mekadesh Ha’Shabbat Ve’Yisrael Ve’ha’zmanim," rather than simply "Mekadesh Ha’Shabbat."
If somebody mistakenly concluded this Beracha by reciting only "Mekadesh Ha’Shabbat," like we do on an ordinary Shabbat, without adding "Yisrael Ve’ha’zmanim," has he fulfilled his requirement, or must he repeat the Amida?
The Hafetz Haim (Rav Yisrael Meir Kagan of Radin, 1839-1933), in Bi’ur Halacha (487), addresses this question, and he notes a passage in the Talmud Yerushalmi which appears to contradict the Gemara’s discussion in Masechet Besa. The Yerushalmi cites Rebbe as maintaining that when Yom Tob falls on Shabbat, one recites simply, "Mekadesh Ha’Shabbat" – the view cited by the Talmud Bavli as the opinion of Bet Hillel, which Rebbe disputed. To reconcile these seemingly conflicting passages, the Hafetz Haim explains that according to Rebbe, one should Le’chatehila (optimally) recite the full text of "Mekadesh Ha’Shabbat Ve’Yisrael Ve’ha’zmanim," but Be’di’abad (after the fact), it suffices if one recited merely "Mekadesh Ha’Shabbat." Rebbe indeed maintained that one should recite "Mekadesh Ha’Shabbat Ve’Yisrael Ve’ha’zmanim," as brought in the Talmud Bavli, but he concedes that if one recited only "Mekadesh Ha’Shabbat," he has nevertheless fulfilled his obligation, as brought in the Yerushalmi.
Accordingly, the Hafetz Haim rules that if one mistakenly recited "Mekadesh Ha’Shabbat" when Yom Tob fell on Shabbat, without reciting the complete text of "Mekadesh Ha’Shabbat Ve’Yisrael Ve’ha’zmanim," he has fulfilled his requirement and does not repeat the Amida. The Hafetz Haim cites other Rabbis who followed this view, and this is also the ruling of Hacham Ovadia Yosef, in Hazon Ovadia.
In the reverse case, however, one would, in fact, need to repeat the Amida. If, on Yom Tob which fell on Shabbat, one mistakenly concluded the blessing with "Mekadesh Yisrael Ve’ha’zmanim," without mentioning Shabbat, then he has clearly not fulfilled his obligation, and must repeat the Amida. The Hafetz Haim makes this distinction explicitly in the aforementioned discussion in Bi’ur Halacha.
Summary: When Yom Tob falls on Shabbat, the middle Beracha of the Amida concludes with, "Mekadesh Ha’Shabbat Ve’Yisrael Ve’ha’zmanim." If one mistakenly recited only "Mekadesh Ha’Shabbat," he has fulfilled his obligation, and does not need to repeat the Amida. If, however, he recited only "Mekadesh Yisrael Ve’ha’zmanim," without mentioning Shabbat, then he must repeat the Amida.

Daily Halacha
If One Recited Only “Mekadesh Ha’Shabbat” in the Amida on Yom Tob Which Fell on Shabbat
Lectured by Rabbi Eli Mansour
