I almost wonder whether the AI chooses whether to pay the ransom based on how much they hate you. I've had wars that dragged about 100 years or so, and by about the middle, the AI just flat out refused to pay for any more troops' ransom. Might not have needed them...but you'd think they wanted those two heirs...