Pennsylvania requires you to pay tax on any car before it is initially registered. However, if you paid taxes to another state (in this case, Maryland), you would use that as a credit to what you owe PA.
Since Maryland and Pennsylvania currently have the same sales tax rate of 6%, you would pay the tax to Maryland. Then hold onto the pink slip, so you can show that you already paid the tax to Maryland. Only difference is if you live in Allegheny or Philadelphia County, you will owe the additional 1% (or 2% in Philly, if you don't do it soon).