After adjusting the brakes in and soaking in penetrating oil, If you have to use a hammer, tap around the mounting flange, being careful not to hit the studs. This will usually break the rust loose. You do not want to hammer anywhere else or you risk cracking or warping the drum.