The steps are followed in order. Whomever holds the Personal Letter card at the end of the round scores the agenda (only agenda that can never be tied!).
Thus, if one player is dominating the UN battleground, by default they will win this agenda. If the UN battleground is tied, it will simply be the player that already holds the card.
Note that the Prestige iconography on the UN battleground differs from the 6 other, in order to accentuate this very point