Praise be to Allaah.
It is permissible for a man to speak to a non-mahram woman if there is a need to do so, and there is no soft speech on the part of the woman or enjoyment on the part of the man, and the talk is of something that is permissible.
But they should limit it to what is necessary, so as to block the means that may lead to evil, because getting carried away in talking unnecessarily may lead to something haraam.
Based on that, there is nothing wrong with a man talking to a woman when buying, selling, asking a question, medical treatment, and so on, if attention is paid to these guidelines.
For more information, see the answer to question number 1121.
With regard to your husband speaking to that woman and advising her to keep away from his friend, in this case -- in addition to the above -- he should weigh up the pros and cons. There may be some interest to be served in his contacting her, or there may be some negative outcome, and there may be no need to do that. He could instead send an anonymous letter in which there is advice, reminders and warnings. This varies according to the situation of your husband and the situation of the woman mentioned.
The safest approach is that he not contact her directly, which may lead him to negative consequences, especially if the woman does not care about forming relationships with men and nothing will deter her from that.
Your husband should advise his friend to keep away from that woman and remind him to fear Allah, may He be exalted.
And Allah knows best.