The 8100 is the better buy, but not by much. Both are very similar in performance. Both are quad cores and both have the same basic architecture. But the 8100 has a base frequency of 3.6ghz and not turbo. Whereas the 7400 has a base of 3ghz and a turbo of 3.5ghz. So the 8100 has a little higher clockspeeds.
Userbenchmark shows a 9% increase in performance, not sure if you will get that bump in all of your applications though.
http://cpu.userbenchmark.com/Compare/Intel-Core-i5-7400-vs-Intel-Core-i3-8100/3886vs3942
PCPartPicker part list:
https://pcpartpicker.com/list/gFgTmq
Price breakdown by merchant: https://pcpartpicker.com/list/gFgTmq/by_merchant/
CPU: AMD - Ryzen 5 1400 3.2GHz Quad-Core Processor ($137.89 @ OutletPC)
Motherboard: ASRock - AB350M Micro ATX AM4 Motherboard ($54.89 @ OutletPC)
Video Card: Zotac - GeForce GT 710 1GB Video Card ($34.99 @ SuperBiiz)
Total: $227.77
Prices include shipping, taxes, and discounts when available
Generated by PCPartPicker 2018-07-01 09:29 EDT-0400
Have you considered AMD? I dont know your budget, but the extra threads on a Ryzen 5 CPU will be a boos in 3d rendering. There will be an additional cost for a GPU, but it may be worth it down the road.