Hi @Deva_Rishi. The way to do this is to manually install one version under the hardware subfolder of your sketchbook while continuing to manage the other version of the platform using the Arduino IDE Boards Manager. I would suggest manually installing 2.4.2 since you won't ever want to update from that version, while using Boards Manager for 3.0.2 since you might eventually decide to join the rest of us here in the future and use the latest version of the platform instead of 2021's 3.0.2.
There are instructions for doing a manual installation of the platform here:
https://arduino-esp8266.readthedocs.io/en/latest/installing.html#using-git-version
(they call a manual installation "git version")
You need to make a modification to their instructions in order to install 2.4.2 instead of the latest development version of the platform. After the step where you cd into the hardware/esp8266com/esp8266 folder, run the following command:
git checkout 2.4.2
After you finish the installation instructions, quit Arduino IDE if it is running and then start it again. You will now see a "ESP8266 Modules (in Sketchbook)" item in the Tools > Board menu. If you select a board from that menu, the 2.4.2 version of the platform will be used. If you instead select the board from the Tools > Board > ESP8266 Boards (3.0.2) menu then version 3.0.2 of the platform will be used.