In my experience, I find processing power to be the most important to meet the criteria. Given that the RAM is the same for both laptops, and the graphics are comparable, I would go for the top one.
You can find them fairly cheap on ebay, but you will have to entirely disassemble the laptop completely to access the cpu slot. Once it is all apart its easy to replace, just make sure to use thermal paste.
The easiest solution would probably be to reinstall the operating system. Becuase it passes the dell screen, it is for sure an OS problem and not hardware.
It is very likely your processor. This tends to happen if your processor is loose, broken, or missing. My recommendation would be to take off the bottom plate and check the processor. There will be a metal heatsink covering 2 square chips, the processor and the graphics card. Be carefull...