Dual hydrocarbon-geothermal energy exploitation