If this is your HP:
https

/www.cnet.com/products/hp-compaq-2710p/specs/
... then the answer is No.
Minimum requirements to run GTA V include a quad-core CPU, 4GBs of RAM and 1GB of dedicated VRAM. But going by my personal experience, you need at least 8GBs of RAM and 4GBs of dedicated VRAM - something like a GTX 980 or 1050.
I regret to say that your current specs are nowhere near these requirements.