A offers to buy him, but not for a few months, wants to return him in the interum.
B says A might as well keep him there, if he is only going to go back in a few months.
A reluctantly agrees, says she won't charge B board during those next few months.
This part is key. It sounds like A had explicitly told B that that A was not interested in purchasing H at that point in time, but instead in a few months from then. That B told A to keep H on A's property in the meantime (presumably for B's own convenience) in anticipation of A's eventual
purchase of H does not change the fact that B continued to own H until their future contract was executed. Since that never happened before H died, B should not be able to recover the sale price from A.
At the same time, A should not be able to recover the cost of board from B as of the time A agreed to board H free of charge in anticipation of taking ownership of H.
It seems neither A nor B considered the possibility that H would suffer an injury that would require euthanization before the sale took place. As a result, B bore the risk that something would happen to H before H was actually sold, and A bore the risk that she was providing free board to a horse that might not ultimately become hers. Had H not become A's as a result of B's changing her mind, though, A would arguably have had a case against B for unjust enrichment (the value of the benefit conferred).
Of course, an alternative interpretation of the facts is that A and B had effectively executed a contract for future performance. Depending on the details A and B discussed, such as a price, a specific date that H would become A's, etc., one could argue that the details of their agreement were sufficiently in place such that their understanding constituted a contract, and B had effectively performed their part by leaving H in A's custody. This would likely be the theory of B's lawsuit. However, this interpretation would seem to conflict with both A's explicitly expressing that she did not want to buy H at that time, but in a few months, and A agreeing only reluctantly to keep H until the time of sale, so I can't imagine it would be afforded much weight.
Of course, the above does not constitute legal advice.