Chosen Solution

My iMac (2017,5k) rear housing is broken. can I use 2015 iMac rear housing for replacement?

no the 2017 have TB3 ports (USB-C) whereas the 2015 will use the older TB2 ports