Retirement tax questions

Thank you, this was very helpful in entering the 1099B. But how does the remaining amount get taxed as ordinary income or should I be taxed on the entire amount when entering the 1099R now.  By way of example, I have to enter $10,000 the entire amount received in the 1099R and get taxed on and penalized but then I also get taxed the $5,000.00 for the 1099B which is the taxable amount on the 1099R. So it is still adding $15,000.00 to my income like I received $15,000.00 but I only received $10,000.00. Is this correct? I was thinking I would be taxed $5,000.00 ordinary income for the 1099R and then $5,000.00 for long term capital gain for the 1099B.  Any thoughts?