In exchange, the French company TotalEnergies would invest in oil and natural gas projects in Texas and elsewhere.