Thank you for using Just Answer.
You have the option to determine your residency termination date as the last day in the calendar year that you were physically present in the United States, which means that you will be a dual-status alien for that year.
You must file Form 1040NR or Form 1040NR-EZ and write "Dual-Status Return" across the top. Include Form 1040 with your return to show the income and deductions for the part of the year you were a resident. Write "Dual-Status Statement" across the top. For detailed instructions see Chapter 6 of IRS Publication 519, U.S. Tax Guide for Aliens.
I sincerely XXXXX XXXXX information is helpful,
It means that on the 1040NR you must show any income earned from US sources while a NON RESIDENT and on the 1040 all income earned while still in US.
You will only be taxed on the US source income while you were no longer a resident. You will not be able to claim treaty provisions on the 1040 but could claim any treaty articles on the 1040NR (for the time you were not in the US) if you have any income that would apply.
Basically you are splitting your time on the 2 returns. I suggest that you get a professional to assist you with this final return.