Those laptops are from about 7 years ago. Note that they have Intel i5, but 4th generation (i5-4xxx). Soon we will have laptops with the 12th generation.
As for upgrading, the CPU is usually not worth an upgrade in a laptop. You can upgrade the RAM (as long as it doesn't exceed the limit) and storage device in most traditional laptops. But consider the price of the laptop+the price of upgrading.
These might be fine for basic use, but programs like Photoshop are only getting bigger and more resource-hungry.
For Photoshop you will need to raise your budget in my opinion.