American office equipment maker Xerox has agreed to buy Chinese-owned printer and printing software manufacturer Lexmark International for $1.5 billion.