Impossible to answer I'm afraid, but if the system isn't going to be driven hard in any specific use case they're much of a muchness.
i5 may be better in some single threaded workloads (such as a lot of earlier games).
Ryzen 5 may be better in multithreaded workloads (multithreaded apps or doing lots of things at the same time).
So for your use case .. get whichever is the cheaper

'Bang for the buck' tends to be favouring Ryzen at the moment, but that may not strictly be the case .. specially where you may already have a motherboard and memory that will work with an Intel .. it's more than just about the price of the CPU.
Personally at the moment (and price being pretty equal) I'd probably favour Ryzen, simply because they're being less hard hit by performance penalties from the Spectre/Meltdown mitigation patches (which there's likely to be more of).