I need a suggestion

So I have a crush on a girl (lets call her A) in my coaching, and I later found out that this another boy also has a crush on her (Lets call him H). It's all fine till here. But today while lunch, I found out that H has been secretly taking photos of A. Now my first thought was to beat the living shit out of him, but I somehow controlled myself. I have decided to confront the girl and tell her what H has been doing all this time. Is this the right thing to do?