It depends what operating system you are on. I'm going to guess Windows, in which case usually I would say that you can only have one version installed by MSI, and for a second version you should use the ZIP installer, which would allow two versions to live side-by-side. The MSI one will show up in the start menu but you can manually make a shortcut to the ZIP version to launch that instead. So bottom line: install one using MSI and the other using the ZIP. I don't think we made a ZIP back in 2.4.2 so you probably want the MSI of 2.4.2 and the zip of 3.8, from
this page.
As it happens, Greenfoot 2 is old enough that Greenfoot 2 and 3 use a different mechanism for the MSI installer and you may be able to install both MSIs at the same time, however they will both show up on the start menu as "Greenfoot" and both try to associate themselves with project.greenfoot files, so it will get awkward to distinguish them.