Upvote:5
You can file a new application as soon as you get one refusal -- but be sure to actually fix the problems that led to the refusal, because a series of successive refusals will get progressively harder to dig yourself out of.
Without seeing the exact text of your refusal it is hard to know exactly what happened -- but it doesn't immediately sound likely that they confused your brother for the family friend. Instead my guess would be that since both your brother and the friend are supporting your trip (even if what the friend provides is food and board rather than cash), they want to verify the circumstances of both sponsors, and you provided documentation only for the brother.
if your friend is not supporting your trip in any way, not even by letting you stay at his place, then you should not provide a letter of invitation from him. But if he is, then the ECO needs to be able to check his details -- that's how it is.
When writing your new application, be aware that the ECO who decides it will probably have your old application and the decision in front of him, so be sure that your supporting material answers any question he may wonder about from comparing them. In particular, any difference between the two applications should be explicitly explained.
(But make sure the new application is self-contained, too. It must not be necessary to dig up the old one to figure out what you're talking about).