I mean i just gived actually an example saying lga 775 because my cooler has the same size and distance between screw-holes. I didn't tell you my cpu cooler coz its I didn't know even the model coz i have bought the whole computer (hp) in a market.
If you want specific answers that really will help with whatever you are planning to accomplish, I suggest you give specific straight info and don't beat around the bush.
Now I have some problems with my pc, that doesn't work and I cant fix it. Thats why i have bought new mobo etc. and on it i want to try if my CPU that I already have (ryzen 5 2400g) still works or if it was cpu that was dead.
I don't know if I understood correctly...
Is what you are trying to say that the HP computer has a Ryzen 5 2400g and you want to try it on the ASRock B450 motherboard to see if the CPU still works?
If that's what you meant, then you can use the CPU cooler that came on the HP and use it to tested the Ryzen 5 2400g.
A CPUs failing is a rare event.
You could post clear pictures of the cooler for us to have a better understanding or maybe the HP computer model.