You can contact the person who has the horse for sale and say you are interested in buying her back.Do not expect to get her back for free, do not even expect her to sell her to you if she doesn't want to, just like any other buyer/seller.
You gave her away. You did not sign anything with "first buy back" terms. No sense taking her to court, she will say she didn't agree to "first buy back" you will say you did say it. She might want to sell you the mare, but will charge you for her expenses I would bet.
Bottom line: you gave her away to this person freely and the horse is no longer yours or your business.