It depends if you were a DC resident. See What is my state residency status?
If you were a resident of DC and PA, you would file a Part-Year return for each. You would allocate your dividends and capital gains based on your resident state when you received the income.
If you did not have DC domicile, you would file as a nonresident DC. You would prepare this return first. You only report DC source income as a nonresident. You would have to report all income on your PA resident return, and you would get a credit for the taxes paid to DC so you would not be taxed twice on the same income.
**Say "Thanks" by clicking the thumb icon in a post
**Mark the post that answers your question by clicking on "Mark as Best Answer"