Andrew Yau :
When I go into System this is the name of my pc http://h20566.www2.hp.com/portal/site/hpsc/public/psi/home/?cc=us&lang=en&sp4ts.oid=5279181&ac.admitted=1424357750928.876444892.199480143#manuals
Then your owner's manual should outline the processors that will work without issues. If you no longer have the manual, you can download it here:
http://www8.hp.com/h20195/v2/GetDocument.aspx?docname=c04123192
A quick perusal of the manual shows these processors (or APUs) as supported:
AMD A Series Quad-Core
AMD Quad-Core A10-5800K APU with Radeon HD 7660D Graphics
(3.8 GHz, 4 MB L2 cache) 100w
AMD Quad-Core A10-5700 APU with Radeon HD 7660D Graphics
(3.4 GHz, 4 MB L2 cache) 65w
AMD Quad-Core A8-5600K APU with Radeon HD 7560D Graphics
(3.6 GHz, 4 MB L2 cache) 100w
AMD Quad-Core A8-5500 APU with Radeon HD 7560D Graphics
(3.2 GHz, 4 MB L2 cache) 65w
AMD A Series Dual Core
AMD Quad-Core A6-5400K APU with Radeon HD 7540D Graphics
(3.6 GHz, 2 MB L2 cache) 65w
AMD Dual-Core A4-5300 APU with Radeon HD 7480D Graphics
(3.4 GHz, 2 MB L2 cache) 65w
Since the Ax-5xxx series is supported, the motherboard would have to be an FM2. That's good news. You have some APUs there that are still available at retail. The A10-5800K being the fastest.