Separating the gear hanger from the derailleur I am trying to exchange my rear derailleur. Now I have the problem of detaching it from the hanger, as you can see in the attached image, I was able to detach the gear hanger from the frame, but I could not turn the inbus (hex wrench) either clock- nor counter-clockwise.
It is likely that you need more leverage. Off the bike the derailer and hanger will be hard to hold. If you have a vice you could clamp the hanger in the jaws and then turn the mounting bolt counter-clockwise. With the hanger held firmly the wrench you're using may be sufficient – and the penetrating oil suggested by @Frisbee in the comment above will certainly help.

If you're still having trouble loosening it, first look at the back of the hanger (the side towards the wheel) to see that the bolt and hanger haven't been "staked" – sometimes parts that are fastened together with threads, but which aren't meant to be taken apart, will have the threads intentionally damaged to prevent loosening. If that has been done you can probably still get it loose, but it will take more effort. It might be worth just getting another hanger if you have a local bike shop (LBS).

In either case (staked or just hard to move) a longer wrench is in order – if you have one, great – but if you don't there are a number of ways to "cheat" one is to use a length of pipe over the end of your existing wrench, another is to use an adjustable wrench to grip the end of the existing wrench, you can also hook the end of a box wrench over the existing wrench. Just be careful as you improvise to think about avoiding slips – they can hurt!

For inspiration: