Retirement tax questions

What 1040 line is it on?  Are they both added to line 4 or 5?   Are they both from the same kind of accounts like IRA?   Maybe one got entered on the other line.