Retirement tax questions

If you put it back in you don't pay tax on it.  After you enter the 1099R Turbo Tax asks if you rolled it over.  Say YES even if you put it back into the same account.  You will still get credit for the withholding in box 4.  

 

But if you did not put back the full gross amount (before the withholding was taken) out then the withholding amount itself becomes taxable income.  And you still get credit for the withholding.

 

Turbo Tax will show it as income on the Review and summary screens but on your actual 1040 it will say ROLLOVER by the taxable line.