"He talks to the doctor."
Translation:Ele fala com o doutor.
falar com implies a conversation, while "falar a/para" implies in "letting one know"
Perhaps it was failed because there is a shade of difference in meaning between "fala ao" (talk TO) and "fala com" (talk WITH), as Paulenrique succinctly commented above. (Thank you SO much for that, Paulenrique!) If a teacher (Duolingo in this case) accepts translations that are a step away from exact, that creates a poor foundation for clear communication.