Viruses grown in $^{35}S$ contained radioactive protein but not radioactive DNA because DNA does not contain sulphur.
Viruses grown in $^{32}P$ contained radioactive DNA but not radioactive protein because DNA contains phosphorus but not the protein.
When they infected bacteria, bacterial cells had radioactive DNA indicating that DNA was the genetic material.