We know this:
Mass of hydrate = 5 g
Mass of anhydrous = 3 g
To find the mass of water that is heated off, we hate to do this:
Mass of hydrate - Mass of Anhydrous = mass of water driven off
5 g - 3 g = 2 g of water driven off
-------------------------------------------------------------------------------------
Answer:
Mass of water = 2 g