It depends on where, in PA, you work on those 4 days. If you work at your employer's PA facility, you are subject only to PA tax on those 4 days. If you work from home, NY will tax that income. NY is one of a handful of states that taxes telecommuters.
If you work outside the state as a job requirement, you are only subject to New York State income tax on the days you work in New York. But if you work outside New York for your own convenience, you are subject to New York State income tax on all your income. Pennsylvania, Nebraska, Delaware and Arkansas have the same rule. CT and NJ "convenience of the employer" rule imposes CT/NJ tax on some out-of-state remote workers, but it only applies if you live in a state that has the same rule