There are two questions here. 1.) Is the girl infected with HIV? HIV is not some magical divine punishment for sexual contact. It is a pathogen. If the girl is not infected with HIV, it doesn't matter what you do with her, or what symptoms you develop. She cannot infect you. 2.) What kind of contact did you have with her? Mutual masturbation carries no risk of HIV infection. If the head of your penis entered her vagina, however briefly, there could be some risk, however small, because the inside of your urethra could have had contact with her vaginal fluids. This risk would become more or less significant depending on her stage of infection, if she had her period, etc. If you did not penetrate (for example, if the head of your penis brushed her vagina) it is very hard to see how her vaginal fluids could have had contact with your mucous membranes, which is what the pathogen needs to get transmitted. Doing this could give you an anxiety attack, but objectively it is very hard to see how it could get you infected with HIV. So far as I know, up to now, no one has been classified as having become infected through such means. Your external penile skin is not a mucous membrane. If the lady were menstrusting and her external genital organs were covered with blood, this is really the only way I can imagine that such a contact would gain any statistically viable profile as a means of HIV transmission. There are other very nasty STDs you can get through this means. If you already have one of those, it could raise your chances of getting infected with HIV. But the medical books and websites stress that even close, intimate or amorous contact, without exchange of body fluids through anal or vaginal penetration, or by means of oral sex, does not result in transmission of the AIDS virus. Even oral sex is only significantly dangerous for the male if he practices male-female oral intercourse while the woman could have traces of menstrual blood in her vagina. Penetration strikes males as both simple and natural, but by doing it even briefly, you are introducing your penis into the environment of the woman's body, which, from the viewpoint of your health, (and especially hers), changes everything.
I hope this is clear.