Hi Loretta,
Reading back in this chapter you will see that James and the elders of the church at Jerusalem had asked Paul to do those things with the believing Jews, that by some compliance with their ceremonial/ritual law it would help them accept him better.
Act 21:18 On the following day Paul went in with us to James, and all the elders were present.
Act 21:21 but they have been informed about you that you teach all the Jews who are among the Gentiles to forsake Moses, saying that they ought not to circumcise their children nor to walk according to the customs.
Act 21:23 Therefore do what we tell you: We have four men who have taken a vow.
V. 24 Take them and be purified with them, and pay their expenses so that they may shave their heads, and that all may know that those things of which they were informed concerning you are nothing, but that you yourself also walk orderly and keep the law.
This was simply Paul conforming in a ritualistic way, knowing full well he was no longer under the law/ordinances, to show these believers (that may have been struggling with this 'new' way of life) he had consideration for them and win them over. Paul does explain why he would do this type of thing.
1Cor 9:19 For though I am free from all men, I have made myself a servant to all, that I might win the more;
v. 20 and to the Jews I became as a Jew, that I might win Jews; to those who are under the law, as under the law, that I might win those who are under the law;
v. 21 to those who are without law, as without law (not being without law toward God, but under law toward Christ), that I might win those who are without law;
v. 22 to the weak I became as weak, that I might win the weak. I have become all things to all men, that I might by all means save some.
v. 23 Now this I do for the gospel's sake, that I may be partaker of it with you.
mercy, peace and love
Kat