No, the P-58 was NOT a development of the P-38.
The P-58 was for a request for what was referred to as a "Destroyer" aircraft, a two-engine, heavily-armed aircraft designed to be a Bomber Destroyer. It went through a number of considered iterations, including as a heavy escort for bombers and also as a possible attack aircraft.
My thought is that it followed a design concept that happened to be in favor at Lockheed at the time - that of the twin-boom aircraft. Many manufacturers go through "spurts" where their aircraft designs all seem to follow the same basic philosophy and kinda look related. One company that really DID try to base everything on one design was Curtiss, who kept pitching "new" fighter aircraft that basically dated back to the original P-36 design. Yes, there were other designs submitted, like the P-62, etc, but if you look at all the "variations on the theme of P-36 or P-40" you can one of the major items that killed Curtiss as a provider of aircraft.
AlanG