The GDP formula is: GDP = Consumption + Government Spending + Investments + (Exports - Imports).
So the Government exports $5 billion worth of Oil. It then takes this $5 billion and funds an Education Program in the nation.
Does this $5 billion go to "Government Spending? Or to "Export"?
Or will this be counted twice? For a total of $10 billion.