IF you actually moved, you will file a tax return as a part-year
resident for each state. It's
a good idea to prepare the state you moved "from" prior to the state
to which you moved so you can get any applicable credits for taxes paid to the
other state. It you earned income from PA (while traveling to PA but not living there) you will include that on the PA tax return. If this is just with a PA based employer from whom you receive a W-2, then you can allocate the income based on where you lived.
How do I file if I moved to a different
state last year?
https://ttlc.intuit.com/replies/3302342
IF you did not move, but were only in one state temporarily for work, then you will file a Resident return for the state which is your permanent residence, and a Non-resident return for the other state.
How to file a non-resident state return?
https://ttlc.intuit.com/replies/3302052
If you regularly live
in both states, then your
resident state is the state in which you have established a
"permanent" residence. To determine permanent residency, some
things that would be considered are owning a home, where your driver's license
is from, and where you are registered to vote.