Xerox, whose name has long been synonymous with office copiers, has agreed to spin off its services business to its shareholders by the end of the year, separating it from the legacy hardware side, according to a person briefed on the decision. A large part of the spinoff will incorporate Affiliated Computer Services, the business outsourcing company that Xerox bought for $6.4 billion in 2010.