Very close. The correct answer is 田中さんは友だちになにかいいました. と indicates what Takaka-san really said, i.e., your translation actually means 'Tanaka-san said "なにか" to his friend.' But, fortunately, this is more close to the original sentence. See the difference between 田中さんは友だちに「なにか」といいました and your initial translation 田中さん…が友だちを述べた, especially particles.