After you file

Huh?  You can never have a tax due for one deducted from the other Refund.  You get the full refund and have to paid the tax due yourself.  Federal and state are completely separate.  Different places.