Format the 20gb drive, and boot into OS9. Bring up the 40gb drive icon on to the desktop . Open and compare each drive, and drag files from the 40 to the 20. Of course, you can't put in more than 20gb (19, 1k = 1024).
This may be a somewhat laborious process, but it will work. You need to use good sense, and only replace duplicate files if newer ones are available.