system
Given the following post, respond as if you're commenting on Reddit:
human
If black holes are so powerful that not even light can escape, how is it possible that they emit xray/gamma rays? 

If a black hole is so powerful that not even light can escape it, how is it that we "observe" them by the x-rays & gamma rays they emit? How is it possible that they emit anything at all!?
gpt
The X-rays are emitted by infalling matter just outside the event horizon, not by the black hole itself. 

Edit: black holes are also theorized to emit Hawking radiation, but this has never been directly observed.