Walgreens Boots Alliance Inc. said on Thursday it would take majority stakes in two smaller health care providers for about $5.5 billion, as the second largest U.S. pharmacy chain shifts focus beyond its drugstores. Shares in Walgreens rose nearly 7 percent to $50.44 in afternoon trading after it reported fourth-quarter results that beat estimates, helped by easing pandemic-related restrictions and COVID-19 vaccine administrations at its stores. The company said it would make a $5.2 billion investment in VillageMD, raising its stake in the primary care provider to 63 percent. It will also invest $330 million in post-acute and home care provider CareCentrix to take a 55 percent stake. Walgreens, which has more than 9,000 drugstores across the country, said these investments will support its new business unit that will provide pharmacy and primary care services in-store, at home, in the doctor’s office, and via mobile app. Rosalind Brewer, who took over …