I'm neither Republican or a Democrat, but at various times, I've been registered for both parties.
Here in NH, a lot of Democrats registered as Republican for the primary, in order to vote for Haley. This was being pushed in many battleground or swing states, including PA.
This kid is known to have donated to a progressive group. Although Pennsylvania has a closed primary, there is nothing to prevent someone from registering with either party at least 30 days before and be eligible to vote. A Newsweek article from December cites over 35k voters switching their registration from Democrat to Republican.
It's not unrealistic to think that this kid registered Republican in order to vote against Trump.