First we need to know your exact machine. There are 16 models of the A1418, going from 2012 to 2017.
Look on the bottom of your stand and get the serial number and plug it in here, then then tell us what you have https://everymac.com/ultimate-mac-lookup...
The fan issue is most likely the temperature sensor on Apples proprietary drives and we’ll work on that when I know your model.
Meanwhile, the RAM (tell us exactly what you put in and how much). Don’t change it back to the original state until you give us your exact machine.
It’s always best to do one upgrade at a time and test before going to the next upgrade, just in case you have issues.
To stop the run away fan issue, you will need an
OWC HDD Compatibility for all Apple iMac 27" models 2012 and Later - digital sensor for SMC
Now tell me what you did on the RAM and what you put in.
(tell us exactly what you put in and how much)
RAM Type:PC3-12800 DDR3*Min. RAM Speed:1600 MHz
Standard RAM:8 GBMaximum RAM:16 GB*
Details:*By default, this system has 8 GB of 1600 MHz DDR3 SDRAM. Apple does not intend for one to upgrade the RAM in this system. This system has two SO-DIMM slots (204-pin).
LED 4 - Indicates that the computer and the LCD display panel are communicating. This LED will be ON when the computer is turned on and video signal is being generated. If the LED is ON and there is no image on the LCD display panel, the LCD display panel or inverter might be installed incorrectly or need replacement.
Check your connections, hook up to an external monitor to verify signal.