If so is it legal as well as free? (Does not have to be free but must be legal)
Yes, but it is not legal. Nintendo hasn't released any Pokemon game on the PC, and probably won't.
The only way to get the game on your computer is to use a ROM on an emulator, which is illegal. So basically, the only way to play R/S/E legitimately is to play it on a DS or Game Boy Advance.