Sadly a very common occurance, the moral as always is never ever give a horse away(i.e one that can't be sold due to medical problems). Either loan them or put them to sleep.
Feel very sorry for your friend though as still always an awful thing to have happen.
I feel very sorry for your friend, this is an awful thing to happen. However i personally can not understand giving a horse away.....surely it makes more sense to long term loan it, that way it is fundamentally the same but you have more power and this can not happen. I would never give a horse away but would long term loan.
On a slightly more helpful note, did the previous owner give a reciept when she gave the horse away to say that she had GIVEN it to them?
If no documentation she could argue that she lent it to them (a suprising number of horses go on loan with no contract) and as she was the last person to pay to purchase that horse (from owners before her) then it still belongs to her and therefore only she can sell it. This only applies if the legal team don't see this forum as you have posted pics and stated that she did give the horse away.
Obviously if she gave a reciept then she is b*ggered because in the eyes of the law when she gave the horse away she gave with it all the rights and responsibilities so unless she had an agreement along the lines of 'the horse can not be sold and must be returned to owner if you no longer want it' then the law will say the horse belongs to them and they have the right to sell it.
I agree with everyone else re the gifting etc tbh. This lady is really a friend of a friend and a very novice owner, he was her first horse.
I think she has just been very naive but not wanted to face the awful decision of having him pts. I think more experienced horse owners realise that this is one issue we all have to be willing to face.
The consequences of being trusting have probably been a harder thing to live with for the poor owner