These are laptop motherboards? Your chasis is going to have to be moded for it to even have a chance, but you know how to connect the screen? and all the other things inside them? I wanna say it be better to just buy a whole new laptop and be done with it, and learn your lesson and never buy a HP again.
Dell makes quality laptops, even if its not popular to say so. But HP are designed to fail.
Sorry if this isnt what you wanna hear, I looked up the 2 motherboards, theres some differences in the look of them that make me say what i said, but as far as acutally being able to boot it up and running, i cant say.