Just to clarify. Are you saying you can turn the cog, (correctly referred to as a gear), but the square stub you have in your left hand doesn't turn?
Can you clamp the square stub in a vice, turn the gear one way and try to turn the housing in the opposite direction?
Can you clamp the square stub in a vice, turn the gear one way and try to turn the housing in the opposite direction?