|Nobody on here is likely to get sore if they don't happen to get Best Answer.|
Your question was whether a virus could survive after format My #1 answered that to the best of my ability, and #3 went further. So, after format you can now go ahead with a fair degree of confidence and install Linux if you wish.
If instead you want us to help eliminate the virus/malware on that old machine running XP please let us know. I'm sure we can help, if for some reason you wish to retain XP.
Fort the future, selecting a Best Answer is not mandatory - you can ignore it if you wish. The requests will soon stop coming.
Always pop back and let us know the outcome - thanks