how to identify IC codes?
The answer lies in the respective datasheets. You will absolutely have to go through the datasheets carefully to identify not just the obvious differences, but sometimes subtle variations. 

Broadly, the 4 ICs mentioned are functionally the same. 

However, they differ in manufacturer, package, temperature ratings and so on. 


The RC4558IP is an "industrial" temperature range (–40°C to 85°C) Plastic DIP IC, the RC4558P is the 0°C to 70°C "commercial" temperature range plastic DIP version, both by Texas Instruments.
The MC4558CN is also a "commercial" temperature range PDIP, but rated for a supply voltage of up to +/-22 Volts, compared to +/-18 Volts for the RC4558 series above.


There may be other such differences, so it is best to examine the datasheets, and take into account any differences which would affect the intended application. 

Basically, "functionally identical" does not guarantee pin-for-pin / drop-in replacement. The actual pin-outs too need to be validated when reviewing the datasheets. 


Sometimes internal block diagrams might differ, but the pin numbering and functions will remain identical. 
In rarer cases even the pin-outs are different, and I suspect many commercial electronics designers have been burnt by this on occasion.