Thank you for the answer. The thing is that when I cut her with my nail she bled so I had some blood on my hand which i didn't notice until we have finished. So would there be any risk if the hand I have masturbated with had her blood on it?
The only cuts that would be a potential risk for HIV transmission would be the kind that need immediate medical attention. You can be sure that if that was the kind of cut you had on your finger, you wouldn't have been poking it into places.
As for the "same-hand-masturbation" and the razor cut, which I assume would have been on your face, still no risk.