Is Sram PG850 cassette a substitute for Shimano TZ31 freewheel?
SRAM Cassettes are compatible with Shimano Cassettes, but a cassette and a freewheel are different components. You will not be able to use the SRAM Cassette to replace your Shimano Freewheel. You will need to replace your freewheel with a freewheel.  

The difference between a cassette and a freewheel is that a cassette is just a bunch of cogs that slides onto a free hub. This allows the wheel to spin without the chain moving. With a freewheel, the cogs and freewheeling mechanism are all in a single assembly, and this is screwed onto the hub of the bike.