You cast Opt and Invade the City this way when Finale of Promise resolves. However, a card cast with Finale of Promise (including Opt or Invade the City) will be exiled rather than go to the graveyard, because that's what Finale of Promise says. Thus, when Invade the City resolves in this scenario, it won't see the Opt card you cast this way in the graveyard in this scenario, but it will see Finale of Promise there, regardless of whether you cast that Opt card before Invade the City, or vice versa, due to Finale of Promise. See also this thread.
Here is how this scenario can play out:
Your graveyard has two cards named Opt, one card each of Invade the City, Lava Coil, Shock, and Chart a Course, and no other cards. Assume you own Finale of Promise. You cast Finale of Promise with an X of 3, putting Finale of Promise on the stack and targeting Invade the City and one Opt, among other steps needed to cast the spell.
All players pass, then Finale of Promise resolves. You choose to cast Invade the City and Opt, in that order (while casting them this way, you put both cards on the stack [C.R. 601.2a]) (C.R. 608.2f). Note that you could have chosen to cast those cards in the opposite order instead (see also C.R. 101.4). Finale of Promise then goes to your graveyard. (Note that if an effect would have a player cast more than one spell at once, that player nevertheless casts them one at a time, since casting a spell is a multistep process [C.R. 601.2]. See also this thread and this thread.)
All players pass, then Opt resolves. You scry 1 and draw a card, then Opt is exiled rather than going to the graveyard (due to Finale of Promise) (C.R. 608.2k, 614.6).
All players pass, then Invade the City resolves. At this point, one card each of Opt, Finale of Promise, Lava Coil, Shock, and Chart a Course are all in your graveyard, for a total of five instant and sorcery cards. Thus, you amass Zombies 5 with Invade the City. After you follow that spell's instructions, that spell is exiled rather than going to the graveyard (due to Finale of Promise) (C.R. 608.2, 608.2c, 608.2k, 614.6).
EDIT: Correction after comment 3 was posted, then edited after comment 4 was posted.
EDIT (Jun. 26, 2023): Edited to conform to rule update for The Lord of the Rings: Tales of Middle-earth.
I have
Invade the City, Opt, Shock, Lava Coil, Chart a Course and Opt (again) in graveyard. I cast Finale of Promise, and choose to cast Opt and Invade the City. Now the questions I present are:
Can I cast Opt first, then Invade to count Opt for the Amass?
How much would I total Amass for? (Both counting and not counting Opt)
Not sure how it all works out. I noob.
Here is how this scenario can play out:
EDIT: Correction after comment 3 was posted, then edited after comment 4 was posted.
EDIT (Jun. 26, 2023): Edited to conform to rule update for The Lord of the Rings: Tales of Middle-earth.
So Amass would be 4? Shock, Lava Coil, Chart and the other Opt? Ok cool.