(a) The block floats with some part outside water when salt is added to the water.
On adding some salt to water, the density of water increases, so upthrust on block of wood increases and hence the block rises up till the weight of salty water displaced by the submerged part of the block becomes equal to the weight of block.
(b) When the water is heated, the block sinks.
On heating the water, the density of water decreases, so upthrust on block decreases and weight of block exceeds the upthrust due to which it sinks.