BP agrees to sell Alabama PTA plant