HP's specifications (https://support.hp.com/ca-en/document/c03143256) says that your motherboard size is 24.38 cm (9.6 inches) x 24.38 cm (9.6 inches).
Palit's specifications (http://www.palit.com/palit/vgapro.php?id=2719&lang=en&pn=NE5105T018G1-1070F&tab=sp) says the graphic card is 16.6 cm long.
It will fit and you have a PCIe x16 slot to add it to.
The minimum recommended power supply for the card is 300W and that is what the HP's specs say that you have in your mini-tower. If your system starts to hang/freeze up on you then your 300W would likely be the cause (I like to give myself a little headroom like +50W than the minimum recommendation but that is my choice).