Worth is something only YOU can determine.
As a guideline, budget about 2x the cost of your cpu for the graphics card.
For most games, the single thread clock rate is all important.
The number of threads is secondary, assuming you have at least 4.
I5-8400 with 6 threads will have a nice turbo.
A motherboard that supports a i5-8400 has an upgrade path to a much stronger processor.
ryzen 7 with 12 threads and ryzen 7 with 16 threads looks to me to be equal.
These can be overclocked nicely.
Any of your choices will be good for a mid range gamer.