What is 10.5.8 (Users) preference file for video?
First, try resetting the PRAM. That is supposed to be where the screen resolution is stored. If that fails, try starting up in safe mode, which can be done by holding shift at startup. Once you're in Safe Mode, try changing the resolution in the Displays preference pane. Then restart without holding shift, and see if it works. If that doesn't do it, then try following these steps at Apple support. Hopefully one of these will do the trick.