IRA Basis and Pro-rata Rule for after-tax IRA contributions

I made after-tax contributions to my company retirement plans. When I left them, I received a statement indicating the amount of my after-tax dollars. I rolled 100% of the investments into my IRA. I never received any other documents like an 8606. In 2019 I took my first RMD at the required amount. Later, I rolled money from the IRA into my Roth IRA. I'm having trouble using turbo tax to calculate the correct basis to apply the pro-rata rule. 

 

Using a made-up example:

Total of 12/31/18 IRAs -$100,000

 

Total after-tax contributions $20,000
% after-tax -20%
2019 IRA Distribution-$10,000

2019 IRA Rollover-$5,000

What is my IRA basis on 12/31/18? It's not the balance and appears not to be the balance less than the after-tax amount.

I can apply the pro-rata to the RMD but do I need to apply it to the Roth rollover? 

I can't figure out what numbers Turbo-Tax is requesting, I've tried various amounts but I know the result is wrong. 

When you respond, please include the math for my example with your explanation.

 

Thanks