What are your requirements? What do you expect of the printer?
Make a list and then compare each printer to your list of expectations.
Odds are that one printer or the other will meet your requirements but any other functions/features are simply "marketing".
Go online to HP's website and read the User Guide/Manual for each printer. Also go the applicable HP printer FAQ's and Forum.
You will learn more about each printer as you read and learn. Very good chance that that process will provide an answer.
If still in doubt go online and look for both professional reviews and "known buyer" reviews. Again you will earn more and then be able to make an informed purchase decision.
Still, any given device can turn out to be a "lemon"...