To do this, it is best to create two partitions on the HD, one for win98 and the other win2k.
Install Win98 to one partition, and then install Win2k to the other. Make sure that when you install win2k you select the option to install to a separate location (not over the top of win98!)
I would also advise, when offered the option, to convert the win2k partition to NTFS. For no other reason than it likes it.