The 4710HQ can take 32GB of RAM per Intel, but it doesn’t mean it will work. The CPU and PCH are designed for 32GB, but you need to make sure the firmware can handle it (or update the BIOS to make it work) - even then it doesn’t always work due to design compromises or defects in certain board revisions (or a shared cost cutting compromise), so it’s safer for the OEM to rate the system at 16GB *officially* and you end up with some machines that don’t take it, while others are capable of handling it with full stability. Be prepared to take it out and go to the HP validated maximum just in case.
The issue with it not being validated is you do not know if it will work, so do not use the machine for critical work without evaluation time AND a memory test to be sure.
What I usually do when I want to max it out beyond the validated limit with the best chances are a BIOS update (last pre-Spectre for older machines/Current for Haswell+) to ensure the firmware is not a potential outliar issue. Even then, I won’t do it professionally to avoid the risk of having to undo the work and max it out to the OEM validation, but I’ll advise them to update the BIOS and see if it works out for them - it could work but it may also crash and burn but it isn’t MY problem because I warned them and told them how to move forward.
Don’t mix and match modules in an HP - get a matched module kit. HP machines are absolute snowflakes about mixed module installs, so finding a pair that works is hard, especially since the compatibility is gone when one goes bad and you now need a matched pair. The memory they use isn’t something most vendors will sell at retail, so it’s hard to find unless you buy a set that was made by one of the companies who sells OEM grade RAM at retail.