Pesachim 52

Until COVID, I visited different communities around the world as a scholar-in-residence – with the Chag where I was almost always away being Shavuot.
Significantly, while Shavuot lasts just one day in Israel, it is celebrated for two days outside of Israel, and this meant that – at least once a year – I was confronted with the practical question addressed in our daf (Pesachim 52a) relating to the proper conduct of someone who comes from a place that keeps ‘one day of Yom Tov’ who finds themselves in a country and a community who observes ‘two days of Yom Tov’.
As previously explained, the concept of מקום שנהגו means that when you are in a community whose customs differ to your own, you must immediately respect those customs and, if you choose to live there, you must also adopt them.
Given this, according to Rav Ami – whose opinion is codified in the Shulchan Aruch (Orach Chaim 496:3) – if a visitor from Israel is in a location where there is no Jewish community, they need not observe the strictures of the second day of Yom Tov because the only reason they would do so is out of respect of a local community – which in this case doesn’t apply. However, if they are in a location where there is a Jewish community, then they must adopt the strictures of the second day of Yom Tov out of respect of local practice.
However, it is important to note that, presuming the visitor is planning to return to Israel, all these are, practically speaking, ‘strictures’ which do not release the visitor from their personal obligations as an Israel-resident – which means that if they are a Jewish male, they are obligated to wear tefillin on the second day of Shavuot, and that the prayers which they utter should be weekday prayers. But how is this done while maintaining respect for the place where they are visiting? The answer is that they should lay tefillin in private and they should utter their weekday tefillot quietly (see Mishna Brura note 13 on OC 496:3).
Yet even if they do so, there is a further question to consider which is whether such a person should recite their weekday Amidah while wearing tefillin in private, or whether it is preferrable for them to put on their tefillin and recite the Shema in private, and then – later on – recite their (weekday) Amidah with the community (who are reciting the prayers for second day Yom Tov)?
Although the former would seem to be preferrable in most cases where someone is not expected to attend synagogue (see Halichot Shlomo: Tefillah 16:12), Rabbi Chizkiyah Di Silva reports in his Pri Chadash (OC 496:25) that when he was visiting Egypt and this situation arose, he practiced the latter. So which do I do?
The short answer is that I practice according to the Pri Chadash for two reasons. Firstly, by virtue of being a scholar-in-residence I am expected to be in synagogue on the second day of Yom Tov in order to deliver sermons and shiurim. And secondly, while I could technically pray my Amidah beforehand and merely pretend to participate (nb. on this point, see Iggrot Moshe OC 3:92), my belief is that to be a scholar-in-residence is not merely to share Torah ideas, but also to be an example of sorts (whether or not I feel worthy of being so), which means that my davening on second day Yom Tov – even if the words that I utter differ from those of the rest of the community – should be real words and thus my davening should be real davening.