I reviewed the teardown of your model iMac. I also own an iMac and have replaced my HDD 2 times. I never actually disconnect the inverter cables.
This is going to involve trial and error since there are no distinctive differences in the cables. Try different combinations with the cables and you will eventually get it.
Im sorry i cant be of more help to you but use caution and don't give up.
Cheers!
-Varsity
crwdns2934105:0crwdne2934105:0
crwdns2934113:0crwdne2934113:0
crwdns2915270:0crwdne2915270:0
crwdns2889612:0crwdne2889612:0
0