Which laptop would be better?

For what it’s worth, my own anecdotal experience is that Linux compatibility is way better on Dell devices than on HP devices. If it is a Dell there is a good chance everything will “just work”. Dell products are typically not that exciting, but honestly I’ll take reliability any day.

HP on Linux can be a bit of a crap shoot–sometimes things work fine, sometimes they do not work and there is nothing you can do about it because HP will just smile and tell you to go pound sand.

Probably you will want to stick to a fairly minimal DE with modestly-spec’d rigs like these. For example, you can for sure run XFCE on any one of those laptops. If you are interested, check out @Colin’s setup guide here: