It seems like, your friend was using some kind of VPN or proxy app into his pc. that’s why microsoft has consider your account as a spam account.
in this case, you have to verify the account ownership first. to verify the account ownership. you can choose any one method, like- phone , security question etc.
once you will verify the account. you will get rid of can’t sign into hotmail account problem.
also remember, do not try to access the account from any other computers in future. because that’s not safe at all.