Who are the "they"?

Ezra 4:6 (ESV)

6 And in the reign of Ahasuerus, in the beginning of his reign, they wrote an accusation against the inhabitants of Judah and Jerusalem.

The they are these enemies of Judah and Benjamin (Ezra 4:1). They probably sent a letter to the king. Since this event took place in the reign of King Xerxes, it is at least forty years after the events described in Ezra 4:1–3. Most likely, then, these are the descendants of the people mentioned in Ezra 4:1.

The author of Ezra refers to events that took place at a later date in order to show how this opposition to the Jews was not just a one-off event, but something that continued. Under the reign of King Xerxes, the opposition was not against rebuilding the temple (since the temple was already rebuilt during the reign of King Darius in 515 BC) but against rebuilding the walls of Jerusalem.