The "befriend them and swap passwords" trick that circulates is a social engineering scam, not a hack. It works by talking someone into handing over their login willingly.
If someone tries this on you, the answer is no. Don't trade passwords, don't accept a "fake" one in exchange, and don't click links claiming to be an account checker. Report the player through the game's reporting tools instead.
Use the official password recovery on the site, change the password to something unique, and contact support if the email on the account has been altered. Petpet Park has since closed, so the same advice now applies to any account you still hold elsewhere: unique passwords and no sharing, ever.