Where there is a claim against the estate of any person maintained in any home, hospital, asylum, or other institution, both on behalf of the Commonwealth and on behalf of any county or poor district, and there is not sufficient in the estate to pay the claim in full, the same shall be paid pro rata to the State and the county, in the proportion of the amount of maintenance legally recoverable by each.
71 P.S. § 1787