Deductions & credits

So I should enter the contribution first and then go to type in the 1099 substitution to input the withdrawal as well as the gain after my financial institution confirmed the withdrawal and gain amount?