You get a socket that fits just around the out side of the bearing. You keep hitting it and this will force the other bearing at the other side out, there is a long thin metal tube inside the rear hub so catch that.
You then put that socket you have just used on a long rod and put it inside the hub and nock out the other one.
Gavin