I've fallen into this trap on three occasions now. Try to think of it like this - if you end up doing the work for them, you're not actually helping them at all. You're stopping them learning for themselves.
I don't know if it was the right thing to do, or whether it would be right for you, but I just reached the point where I told them point blank that I wasn't going to do any more for them. They'd worked with me enough to see how it was done. If they hadn't been sensible enough to learn from that, I couldn't be responsible. Two of them pretty much haven't spoken to me since and the third keeps communication to a minimum. It ought to be unpleasant, but it's really just a relief. They turned out not to be friends at all.
I know from experience that it's easier to give the advice than to implement it, but you need to just stop helping. With my friends, their requests for help became expectations, and eventually, demands. If they got poor marks, those were my fault. Looking for a reference became reading the paper and telling them what they needed to answer the question. TBH, my "help" was starting to border on an academic offence before I felt I could put my foot down.