Here is the memory that is recommended by Crucial Memory. If Crucial recommends it, it is guaranteed to work or it will be replaced at no additional cost to you. They make very good memory for OEM computers. Read the entire page for all of the information.
You can go into HP Support Assistant to determine the brand of memory that is in the computer. I would contact Crucial's Tech Support to assure their memory will be compatible with it. If not, you will have to buy two 4 GB modules.
Please click the Thumbs up + button if I have helped you and click Accept as Solution if your problem is solved.