You don't owe for every cent she received in TANF.
You owe the amount of the court order, starting with the effective month of the court order.
You don't pay the state anything. That is support, you owed for the children, and the state advanced it to the other parent, in hopes that you would pay what you owe, and they oould accept it as repayment for support.
If you paid as much as you owed, according to the court order, then there is no arrrearages, and your refund will not be attached.
If you started out four months behind (common), and never made up those months, then there are arrearages, and your refund will be attached.
The state does not get any money, other than repayment. The taxpayers receive no benefit from you paying your obligated support payments.