FedEx Corp. plans to buy back $5 billion of its shares as cost-cutting efforts help boost profits, a move that has sent the couriers stock soaring.