Two potential things that could prevent it working.
- Your case may only have Low Profile slots. So the width of the case isn't enough to allow the card to go in.
- And the Power Supply inside may not (probably wont) have the right connectors or wattage to sustain that card.
Easy way to find out is to bust open the case and check.
If the graphics card already in there (a GT520) is of Low Profile size, then you can only put in low profile cards, which will limit what cards you can get.
Next you want to look for the electrical specifications on the PSU, given its a pre-built it would be at the top of the case. Need to find the amperage (A) that the 12v rail/s are running at. That will tell me the wattage of the system. Will look something like this
Also look through the cables coming out of the PSU. What you need for that card are two 6-pin connectors that look like this. If they arent there then you will likely need a new PSU.
Here's the specs of the size of the card you want to put into it. 8.25" x 4.38". When I looked on the HP site, it shows a pic of the motherboard and where they placed the RAM slots...I don't think it will fit. The system you are interested in contains a Nvidia Geforce GT520,which according to the specs is about 5 and a half inches long and a little over 2 and a half inches wide, which looks to be about max length and width of a PCI-E video card to fit on that motherboard. You could try it but I wouldn't be surprised if it didn't fit. I hope I'm wrong. Good luck.
Agreed with manofchalk. Without knowing the power supply what it supplies it will be very hard to say what would be a good option for you. It is also possible that it may be a low profile case in terms of the expansion slots. Keep in mind as well that given the tech that has come since the 400 series of cards that it would be far greater investment to look at the 600 series a 650Ti for example if you are tight on a budget. This all pending your look at your power supply and expansion slots.