To start with you can not replace a cog on a Freewheel you'll have to replace the whole thing. A freewheel is threaded and will thread onto the Hub, a cassette slides onto the hub and will fasten from the outside with a threaded fastener, it will come apart in pieces. You will not need a new hub just a freewheel with the right set of cogs, I'm not sure if you will be able to find a 9 tooth or not.