How to remove speedo drive gear?

Probably stuck. Might use a screwdriver/ hammer to gently tap in one of the slots to turn the housing and loosen it up. Then screw the speedo cable back on, and use pliers to wiggle it out.