I am not quite sure but I think "a friend of them" is not quite correct. It's probably must be "a friend of theirs".