The series of "Ha’Rahaman" prayers added to Birkat Ha’mazon are recited only by force of custom, except for one, which is mentioned already in the Gemara, and is brought as Halacha by both the Rambam and Shulhan Aruch. That Beracha is "Birkat Ha’ore’ah" – the special blessing recited by a guest thanking his host and wishing him success and prosperity. This blessing appears in Siddurim, and a guest who is hosted in somebody’s house must ensure to include this blessing in Birkat Ha’mazon.
There is a debate among the Halachic authorities as to whether this Beracha is recited by a guest who eats his own food in somebody else’s home. The Mishna Berura (Rav Yisrael Meir Kagan of Radin, 1839-1933) cites the ruling of the Magen Abraham (Rav Abraham Gombiner, 1633-1683) that a guest does not recite Birkat Ha’ore’ah in such a case. According to this view, the blessing was instituted to thank a host who provided the guest with food. Rav Yaakob Emden (Germany, 1697-1776), however, disagreed, and maintained that the host’s allowing the guest to eat in his home and at his table suffices to require the guest to recite Birkat Ha’ore’ah.
A contemporary application of this debate would be the recitation of Birkat Ha’ore’ah in a restaurant. Does a patron include this blessing when reciting Birkat Ha’mazon after eating his meal in a restaurant? According to the Mishna Berura, it would seem that the patron would not recite Birkat Ha’ore’ah, since he paid for the food he ate, and thus he ate his own food. Therefore, even though he ate the food in the restaurant owner’s facility, he does not recite Birkat Ha’ore’ah. According to Rav Yaakob Emden, however, the guest would likely need to recite this Beracha, even though he purchased the food, since he ate in the restaurant owner’s property. This was, in fact, the position of Rav Yosef Shalom Elyashiv (1910-2012), who noted that since the patron benefits from the fact that the restaurant owner opened this establishment, offering a place to purchase and eat kosher food, the guest should express gratitude by reciting Birkat Ha’ore’ah. This is also the view of Rabbi Yisrael Bitan (contemporary).
Hacham Bension Abba Shaul (Israel, 1924-1998) applied this Halacha to the case of a sponsored meal served in the synagogue, such as a Se’uda Shelishit. Those who participate should recite Birkat Ha’ore’ah in Birkat Ha’mazon, and express their gratitude to the sponsors who are "hosting" them for this meal.
In conclusion, it is worth noting the story of Rav Yisrael Najara (c. 1555 – c. 1625) who once reprimanded a guest for reciting Birkat Ha’ore’ah in a loud, clear voice, but rushed through the rest of Birkat Ha’mazon. It is certainly proper and admirable to recite Birkat Ha’ore’ah loudly and emphatically in honor of one’s host, but if one recites this blessing more emphatically than the rest of Birkat Ha’mazon, he displays greater respect to his host than to Hashem. As important as Birkat Ha’ore’ah is, it must never be regarded with greater importance than the rest of Birkat Ha’mazon, all of which should be recited slowly and with feeling and concentration.
Summary: A guest must include the special "Ha’rahaman" prayer for his host (printed in Siddurim) among the other, standard "Ha’rahaman" prayers customarily recited at the end of Birkat Ha’mazon. This prayer should be recited even by guests eating in a restaurant, to express gratitude to the restaurant owner, and at a sponsored meal in a synagogue.