When you add CuSO4+KI the substance stays clear and when you add hexane to it it became brownish yellow and a red substance was present how do you explain this?

I don't know what you mean when you say the solution was clear. You SHOULD mean that it has no ppt but you probably mean (because my students always confuse the words) colorless. However, if it is CuSO4 it should be blue. At any rate, what happens is the I^- reduces the Cu^+2 to Cu^+ and the I^- is oxidized to I2. Close observation should have noted a slight yellow color in the aqueous phase before the hexane was added; however, that happens only if the solution is concentrated enough to show the yellow color and the red ppt of CuI may have hidden the yellow color. When hexane is added, the I2 dissolve preferentially in the hexane and the I2/hexane layer turns color (to violet--or pink if the concn is low).

oh ok so why did it turn blue purple and pink when i added NH3 to it?

The Cu^+2 from the CuSO4 formed a complex ion that is deep blue to light blue, depending upon the concn, due to Cu(NH3)4^+2.

To explain the observed changes when adding CuSO4 and KI, followed by hexane, we need to consider the chemistry involved.

1. Addition of CuSO4 and KI:
CuSO4 is copper(II) sulfate, while KI is potassium iodide. When these two substances are combined, a double displacement reaction occurs. The copper(II) ion (Cu2+) from CuSO4 reacts with the iodide ion (I-) from KI to form copper(I) iodide (CuI), while the sulfate ion (SO42-) remains unchanged. The balanced equation for this reaction is:

CuSO4 + 2KI -> CuI + K2SO4

Copper(I) iodide is a yellow solid, and potassium sulfate (K2SO4) is a soluble salt.

2. Addition of Hexane:
Hexane is a nonpolar solvent that does not mix with water or other polar solvents. The addition of hexane to the solution containing CuI and K2SO4 creates two immiscible layers, with hexane forming the upper layer.

3. Formation of Brownish Yellow Color and Red Substance:
The brownish yellow color and the red substance that appear in the hexane layer are due to the presence of an organic compound called iodine (I2). During the double displacement reaction, some CuI may oxidize in the presence of excess iodide ions (I-) to form iodine. Iodine is not soluble in water but is soluble in nonpolar solvents like hexane, hence its migration into the organic layer. The balanced equation for the potential reaction where copper(I) iodide oxidizes to form iodine is:

2CuI + 2I- -> Cu2I2 + I2

The resulting reddish substance in the hexane layer is likely the copper(II) iodide (Cu2I2) formed during this reaction.

In summary, the clear solution in the water layer contains K2SO4, while the brownish yellow color and red substance in the hexane layer are due to the presence of iodine and copper(II) iodide.