Retirement tax questions

The full amount 31,000 will be taxable to you.  It will add to your income and may push you into a higher tax bracket.  You also will owe the 10% Early Withdrawal Penalty on the full 31,000.   Then you will get credit for the withholding taken out.