All of the times the word "they" is used and the first time "them" is used, the words refer to the magistrates. The word "themselves" refers to the magistrates. The second time the word "them" is used, it refers to Paul and Silas.
Probably Paul is speaking to the jailer, but he intends for the jailer to tell the magistrates what he says. AT: "said to the jailer" (See: [[rc://en/ta/man/translate/figs-explicit]])
Here "They" refers to the magistrates who commanded their soldiers to beat them. AT: "The magistrates ordered their soldiers to beat us in public" (See: [[rc://en/ta/man/translate/figs-metonymy]])
Paul uses a question to emphasize that he will not allow the magistrates to send them out the city in secret after they had mistreated Paul and Silas. AT: "I will certainly not let them send us out of the city in secret!" (See: [[rc://en/ta/man/translate/figs-rquestion]])
To be a Roman meant to be a legal citizens of the Empire. Citizenship provided freedom from torture and the right to a fair trial. The city leaders were afraid that more important Roman authorities might learn how the city leaders had mistreated Paul and Silas. (See: [[rc://en/ta/man/translate/figs-explicit]])