If your cans or bottles say NY 5¢ then yes they can be redeemed even if you purchased them in Pa!
You only get deposit back from products marked as 5¢ deposit and in participating states. PA doesn't participate in bottle/can deposit.
Thanks! Your answer is awaiting moderation.