Paul was told to put his customary Jewish outfit on and portray himself under the law to show to the Jews that the Jewish apostles are not teaching contrary to the law of Moses. James then states that the Gentiles are not to follow this instruction. Then Paul set out to convince the Torah observers, all the while the opposition were accusing the apostles of being against the people, and the law, and this place (Temple): and further brought Greeks also into the temple, and hath polluted this holy place (Temple).
It is clear that in order for the apostles to appease the Jews to get a hear in by them, they must be seen to follow the Jewish customary ways. They did so as a Trojan Horse to penetrate the hearts of the Torah observers without being detected, dismissed and kicked out without getting the chance to preach to their own people.
The apostles used this method as a Trojan horse to achieve their directive to preach the gospel into the hearts of the citizens all the while, while appearing to not have left Torah observances. This is evident because of the ways they were kicked out a number of times from the temple, whenever they tried to access the hearts of Jews in preaching to them.
What gives this away is that the accusers tried to portray the apostles in a bad light to show that they even brought along with them Greeks to the temple, hence polluting the Holy place.
That is why Paul is instructed by James:
Acts 21:23-24
Do therefore this that we say to thee: We have four men which have a vow on them; Them take, and purify thyself with them, and be at charges with them, that they may shave their heads: and all may know that those things, whereof they were informed concerning thee, are nothing; but that thou thyself also walkest orderly, and keepest the law.
Paul was instructed to just pretend and put on the cover of an obedient Torah observer. James didn't say observe the Torah, quiet the opposite. So that this pretentious act isn't witnessed and talked about by the believing Gentiles, James would further instruct to tell the Gentiles the following:
Acts 21:25
As touching the Gentiles which believe, we have written and concluded that they observe no such thing, save only that they keep themselves from things offered to idols, and from blood, and from strangled, and from fornication.
It would be hypocritical for the apostles to ask Paul to observe the Torah whilst deliberately instructing the Gentiles that they are not to. This pretentious ACT, hence the ACT OF THE APOSTLES, by the apostles was just to fish along their own people by pretending to be observers of the law, nothing more and nothing less.
God bless