He would probably just cut Sonic's hair off in return.
It is a joke question with a joke answer, and the symmetry is the punchline: an eye for an eye, or in this case a haircut for a haircut. Neither character has hair in any conventional sense, which is what makes the whole premise funny to begin with.
Shadow's actual character is rather less petty — his motivation in the games runs to grief and duty rather than retaliatory grooming — so the in-universe answer would be a lecture followed by combat. The quip answer is better.