Most of the time, it does this because there are programs running in the b/g that are waiting to close before it starts shutting down.
First, backup yer registry or make a restore point. In Regedit, find HKEY_CURRENT_USER\Control Panel\Desktop.
Change these settings:
HungAppTimeout=4000 (delay a hung application will wait before it quits when asked, with each 1000 being 1 second)
WaitToKillAppTimeout=4000
AutoEndTasks=1 (this one automatically closes down the programs when winxp starts to shut down)
It should close down much faster with these changes. I'd also suggest disabling any sound you have that plays when XP shuts down (as that's just another brief moment that XP needs to "load" something while you're trying to close down.... seems kinda counter-productive).
All stolen from
TweakTown, which has some other good tweaking info for XP in their tweaking guides.
deadseasquirrel