Um, ok. I'm not up to date with the state of the art in Unix administration so is this some new Good Practice™ to have an account with unlimited sudo instead of a root password or just another instance of unrealistic interview question?
And speaking of solutions: stop vi with ^Z, do whatever you want in the shell, resume vi, finish editing, write, quit :)
Some distros don't even set a root password in the default configuration, and I generally would expect in all larger environments that if a root password exists, it isn't easily accessible to an individual admin. If someone leaves, you just have to turn off their account and not replace the root password everywhere.