It is most logical, when reading the they,
to think of Peter and John. It is beautiful to see how on their return trip, they visit the Samaritans who have come to faith as brothers and sisters and encourage them in the faith (comparable to Paul’s return trip on his second missionary journey, Acts 14:21–22).
A different exegesis than above connects Acts 8:25 as a concluding verse with the beginning (Acts 8:4). It argues that they
refer to the refugees from Jerusalem who are now returning to Jerusalem again, and who are spreading the good news of Jesus everywhere, just as in the beginning. They return, because the first wave of persecutions seems to have passed. They form the church which, according to Acts 11:22, is back in Jerusalem again. On the way to Jerusalem, they witness about Jesus Christ (“diamarturero” - see in Acts 1:8 “martus”).
25 Now when they had testified and spoken the word of the Lord, they returned to Jerusalem, preaching the gospel to many villages of the Samaritans.