Retirement tax questions

Correct.  A code 8 is a return of excess contribution that was deducted from your W-2 box 1 wages when contributed, so when returned it gets reported as wages on the 1040 line 7, not as a retirement plan distribution.

Line 7 is where the income would have been reported had the contribution never been made so returning it is the same as not making the contribution in the first place.

Line 7 is correct.
**Disclaimer: This post is for discussion purposes only and is NOT tax advice. The author takes no responsibility for the accuracy of any information in this post.**