The intel 9700k has better gaming performance but at a higher cost and a higher power draw. the benefit over the 3700x is very minimal though especially if you are going to be doing multiple tasks at once in which the intel chip will have a harder time with that. What would make a big difference in the purchase though is the memory and your current CPU cooler. Intel does not come with a CPU cooler so you will need to buy a 100w tdp cooler and ryzen is very dependant on ram speeds (3000MHz or higher is preferable). I'm assuming a new motherboard will need to be bought in both situations and intel motherboards are more expensive at this point in time.
I would go with the Ryzen 3700x taking into consideration power, cooling, and motherboard prices alone though as intel is more expensive in all those areas as well as costing more, to begin with.