The only way to truly transfer an account to someone else (not sell, cause that's bannable and I'm reformed) is to also transfer the original email linked to the account. Don't use this advice though, kids.
If you want to avoid doing what he did. simple. there a lot of method that they would trick your ass out of it. super common is they would ask your account info to see if their credit card or debt card is working. most common is they would ask you for help to doing on teamviewer that he would put his money on your account and then he lock your damn ugly screen by teamviewer. might be common but mostly uncommon they would ask you to download their hack rf which is when you login with that is stored to their data. rarely they would collect your whole information when they show on your room. very rarely ***** apply a job for gm and steal all data. unless if you loves to lose all your account then be an idiot like him.