The question of who the court writes the check out to is not the same as the question of who is entitled to the money. The rule, apparently, is the court returns to money to whoever paid it into the court.
Just because the check is written to the law firm doesn’t mean that the law firm gets to spend it. The law firm may be deemed to hold it in trust for the persons entitled to it. That happens all the time.
It should go back to that firm...and then to Kyle (since it came on his behalf). Kyle has to and should pay his bills out of it.
They'll figure it out.