Walgreens Boots Alliance Inc. agreed to buy Rite Aid Corp. for about $9.4 billion, in a move that would create a drugstore giant at a time when companies in nearly every corner of the health-care industry are seeking to gain advantage from bulking up. Walgreens agreed to pay $9 a share in cash for Rite Aid, offering a 48% premium to Rite Aid's closing price Monday. Rite Aid's stock rose 43% to $8.67 Tuesday after The Wall Street Journal reported on the deal talks.