Hewlett-Packard is splitting itself into two companies, one focused on its personal computer and printing business and another on technology services such as data storage, servers and software, betting that it can drive faster sales growth with more-focused operations. Hewlett-Packard, like other PC makers, has struggled as customers shifted toward smartphones and tablets and away from desktops and laptops.