Complex sentence: ABG then bought natural gas at market prices and sold it at a premium to Dynegy, with the profits ABG booked used to repay the loans.
Split into simpler sentences: ABG then bought natural gas at market prices and sold it at a premium to Dynegy. The profits ABG booked were then used to repay the loans.