The first one is probably a firmware password, and is more difficult to remove since it is hardware-based.
The second one, after the OS gas started to load, is probably a Multiple Users password. It's fairly easy to fix since it is software based.
You will need a bootable CD, one appropriate for that machine model. It need not be an OS install CD, thuogh that is best; it can be a utility CD, such as one for DiskWarrior or TechTool. If you happen to have a bootable external hard drive, that will work also.
Boot to the CD. Do not run any installer or other program on the CD - you just need to boot to it. The purpose is to get the machine booted to a volume other than the volume with the OS that needs fixing.
Once the machine is booted to the CD, open the System Folder on the internal drive. In that, open the Preferences folder. In that, look for a file named Multi-User Prefs. Drag it to the Trash. Empty the Trash.
Then do a normal restart. All Multiple User passowrds and requests for same should now be gone.
Not sure what the command you mention, Control-S or Command-S, is supposed to do. I'm not familiar with that for OS 9, and I know just about all OS 9 commands.
Your comment about getting a message stating
...there is not enough virtual memory to load with extentions enabled...
is a bit curious. A message such as that usually indicates that the hard drive is too full, and/or Virtual Memory has been set too high.