They must re-dedicate themselves to the Lord for the full time they originally promised and bring a one-year-old male lamb as a guilt offering. The previous days don't count towards the time of dedication because they became unclean.
So Paul took the men with him, and the next day went and purified himself with them. Then he went to the Temple to give notice regarding the end of the time of purification and the offering which would be made for each of them.