Can you install OpenHAB2 & OpenHAB3 on same windows machine?

It depends on the power of your Windows machine and the resources given to the VM.
Other possibility would be to run Linux as Host system on that machine as well and use it as hypervisor for your Ubuntu VM‘s.
Or you could try with two different docker containers….
The link is about running on a NAS, but this makes no difference…