The taxes you paid or had withheld are just estimates like withholding from your paychecks. You have to add the income and figure the tax on all your income then get credit for the withholding on 1040 line 25b.
I didn't follow your post. Yes you owe tax on a RMD. What do you mean invested in a personal 401K? You can't put a RMD into another 401K or IRA account. You have to take the cash.