Shulchan Arukh, Orach Chayim Siman 595
Can copy this into an AI, or connect the whole library to your assistant. For deeper learning, you can directly use the original seforim, sites, and apps.
מי שאינו בקי בתקיעו' ולא בסדר תפל' מוסף ולפניו שתי עירות באחת בקיאים בתקיעו' ולא בתפל' מוסף ובאחת בקיאין בתפל' מוסף ולא בתקיעו' הולך למקום שבקיאים בתקיעו' אפי' של מוסף ודאי ושל תקיעו' ספק: הגה מיהו אם יכול לילך למקום שמתפללים ויש שעות ביום שישמע אח"כ התקיעות במקום שתוקעין יקיים שתי המצות דכל היום כשר לתקוע: (ב"י בשם ירושלמי):
One who is not an expert in shofar blasts (Tekiyos) nor in the (Rosh HaShana) Prayers. And in it is one paragraph One who is not an expert in neither the Tekiyos nor the order of the Musaf Prayer, and before him is two cities. In one, experts in the Tekiyos but not the Musaf Prayer. And in one, experts in the Musaf Prayer but not the Tekiyos. He should go to the place that has experts in the Tekiyos even if the Musaf is for certain (i.e. their expertise), and Tekiyos is a question (i.e. in their expertise). Rema: However, if he is able to go to one place that prays, and there are hours in the day to hear afterward the Tekiyos in the place that shofar blasts, he should fulfill two mitzvos, because the whole day is fitting for shofar blasting (Bais Yosef in the name of the Talmud Yerushalmi).