Chosen Solution

A) I have a working iMac Late 2017 27" 5K 4,2 Ghz Intel Core i7 with a cracked glass and B) I have a broken iMac Late 2013 27" 3,5 GHz Intel Core i7 with flawless exterior. And I want to change the insides of A into B to have one fully working again and one fully broken. Is this possible? It’s no problem that the screen would be non-Retina.

Sorry the 2013 display won’t work with the Late 2017 5K logic board. Apple uses a custom cable to support the higher res of the 5K display which is different from your 2013 system and not compatible.