First, notice that Paul does this on the Sabbath day in a synagogue. He speaks to "brethren." In this context, brethren does not mean fellow church members but "fellow Israelites"—Jews, Levites, Benjamites, or whatever tribes they were from. They were brethren in terms of their ethnic relationship.
Second, he also speaks to those described as "you who fear God." This term was used of Gentiles who were proselytes of Judaism, Gentiles who had converted to Judaism. Here is a congregation in a synagogue, consisting of Jews and Gentiles already converted to Judaism—keeping the Sabbath. By the way, this took place in the environs of Galatia.
John W. Ritenbaugh
The Covenants, Grace, and Law (Part 24)
Christ set the Sabbath-keeping example for his apostles, and Paul, following His example, tells us we are to imitate him as he imitates Christ (I Corinthians 11:1). Paul preached to the Jews and Gentiles on the Sabbath because the Sabbath is for everyone, not just the Jews. These Gentiles were keeping the Sabbath in the synagogue with the Jews on the seventh day, not Sunday.
Martin G. Collins
The Fourth Commandment