apply_damage is a member function of the class Hero, but you call it like an ordinary function.
isn't member_function_name(parameter) the way to call the function?
Line 16: operator * is not a member function of Hero.
Line 19: When you call apply_damage(), you have to do so relative to a Hero instance because apply_damage() is a member function. You're not doing so.
Lines 17-18: You're copying the arguments to A and B, but A and B go out of scope when the operator * function exits losing any changes you made.
Line 16: The function definition says it returns a Hero instance by reference (return type const Hero &), but no such return statement is present.