In Pennsylvania, licenses, titles and registration are handled by PennDOT (the Pennsylvania Department of Transportation). Its two deadlines for new residents are different, so watch the shorter one.
Title and registration: 20 days
You must apply for a Pennsylvania title and registration within 20 days of becoming a resident. You'll need a valid Pennsylvania driver's license or photo ID to do it, which is why most people get the license first, even though they have longer for it.
Applications go through an authorized agent: many inspection garages, notaries, dealers and PennDOT's online messenger services can process the form (MV-1) for you, some on the spot. Bring your out-of-state title and proof of insurance, and expect to pay title and registration fees.
Driver's license: 60 days
New residents with an out-of-state license have 60 days to switch, at a PennDOT Driver License Center. You'll take a vision screening, show proof of identity and residency, and surrender your old license. If it's valid or expired less than six months, you don't need a knowledge test. Commercial drivers have 30 days.
Inspection: 10 days after registering
Once your car is registered in Pennsylvania, it must pass a state safety inspection within 10 days, at an official inspection station (usually a repair shop). Some counties also require an emissions inspection; check the Drive Clean PA website or hotline to see if yours does.