The California-based energy company has agreed to pay $9.45 billion for the bankrupt power giant, the subject of a tussle between two billionaire investors.