Working across state lines makes your taxes even more complicated. If you live in one state and work in another, and both charge income tax, you often have to file with both states. If the two states have a reciprocal tax agreement, you only file once. Pennsylvania has several reciprocal agreements with other states -- but not Delaware.
If you work in Pennsylvania, it's that employer's responsibility to withhold the income, Social Security and Medicare taxes from your paycheck. Usually employers base withholding on federal taxes, which are the same everywhere, and the taxes of the home state. When there's a substantial difference in state taxes that can be a problem: Withholding isn't based on your home state's rate, so you may end up owing tax instead of getting a refund.
When two states have a reciprocal agreement -- as Pennsylvania has with six different states -- you only pay state taxes to the one you call home. If you tell your employer you're from out-of-state, he should adjust withholding to match your home-state income taxes. When states don't have a reciprocal agreement, you have to report your income to both governments unless one doesn't have a state income tax. Pennsylvania and Delaware both do.
The good news is you don't have to pay double tax. If you work in Pennsylvania, figure out how much you owe and whether you get any of your withholding refunded. Calculate your Delaware taxes on your Pennsylvania income, but subtract a tax credit based on what you paid that state. Claim the credit on line 10 of the Delaware form. Attach a copy of your Pennsylvania income-tax return to prove your credit is legit and not a scam.
If you move to Delaware, or any state, partway through the year, you only owe tax for the time you're there. Your state of legal residence, or "domicile," is the one where you register to vote, take out a driver's license, apply for in-state tuition or take other steps that show it's your true home. Even if you spend all or most of your time in Pennsylvania, you're still a Delaware resident if you meet the domicile requirements.