Palm Inc. a pioneer in the smart phone business that couldn't quite make the comeback it needed, has agreed to be bought out by Hewlett-Packard Co. for about $1.4 billion in cash.