both of them = they both / them both
both of us = we both / us both
both of these/those = these/those both
Both of them like swimming. = They both like swimming.
I like both of them. = I like them both.
both of them の both は代名詞です。
they both / them both の both は、先行する代名詞と同格的に代名詞を並べて使っています。
We brothers have always been together since we were small.
It must be one of them girls who did this.