How do I stop my rear derailleur from rubbing against my chassis? I have a fairly new Shimano rear derailleur on a cheap department store MTB a friend gave me. Recently the derailleur (particularly the jockey wheels) have started to rub against the chassis in high gears. I tried reseating it on the hanger at a larger angle, but even as far as it will go, it just wants to spring back until it hits the chassis. The best I can get it has it with very little clearance. 

Here are some pictures: 




Zoomed in so we can see the derailleur hanger (with "Hole A") that is bolted to the frame. It doesn't move when the axle is loosened.



I don't particularly care for the paint job, but I do want it to stop hitting against the chassis and risk affecting operation. How do I fix it?
To clarify, these Shimano Tourney derailleurs have their spring-loaded pivot at a different place to where they attach to the derailleur hangar. Pivot B is not a pivot at all, and shouldn't be free to move. However, it is currently attached at the wrong angle. The angle made between the hangar and the rigid part of the derailleur should be more acute, as in this image.



Note that there is a protruding tab on the derailleur's attachment point, and on the hangar itself. These tabs should be pressed against each other, such that the arrangement prevents that part of the derailleur from rotating in an anticlockwise direction relative to the hangar. I've highlighted the tabs that need to mate together in the image below.



You may need to fine tune the chain length and derailleur adjustment further, follow the Shimano service instuctions for RD-TX55.