The original sentence is a direct question, and when reporting it in indirect speech, we use the verb "asked" and the correct word order (subject + verb + question word).
The correct indirect speech is:
"My friend asked me if Saima had talked to Sonia."