Not if your income was from wages. Maryland and Pennsylvania have a reciprocal agreement, where you only pay tax in Pennsylvania. You should have filed MW 507 with your Maryland employer so that you wouldn't have tax withheld from your wages.
If your employer withheld Maryland taxes anyway, file a nonresident Maryland return to get that money refunded.
If your income from MD was self-employment income, however, you would be taxed by Maryland on that income. The tax calculation applies a percentage based on your income earned in Maryland to the tax on all of your income.
https://ttlc.intuit.com/replies/4776822
**Say "Thanks" by clicking the thumb icon in a post
**Mark the post that answers your question by clicking on "Mark as Best Answer"