Iron Nail is Fe and blue copper sulphate is CuSO4. When nail is kept in it, Fe being more reactive than copper, it displaces copper from Copper sulphate and forms Ferrous Sulphate which is greenish blue, and the copper displaces deposits around nails giving it colour of reddish brown.