Affixes are subdivided into prefixes, which precede the base to which they attach
Affixes are subdivided into prefixes, which precede the base which they attach to.
The difference between them just is to put the phrase attach to together or division. I think the second one is easier to understand and easy to use? But the first is more formal?