The larger end of the connector is placed on the LCD panel board. The white numbers you see on the cable will face towards you when you're plugging the cable into the LCD panel (so they would face the back of the iMac housing when installed). Your replacement cable does not have these white markings, however, so I'd overlay it to see what direction it needs to be plugged in. If you're looking at the back side of the display, it should look like this (the same way you have it in the pictures, just with the backside of the display behind it):
The display side of the connecter has two release clips on either side. Gently pinch the connector from the two furthest points and slide it in without using much force.
When you're going to put the screen back on the iMac and plug the smaller end of the cable into the logic board, it is essential you get the display as close to the computer as possible (smallest gap to work with unfortunately....), make sure the retaining clip is on the top of the connector so it can be pushed down after the cable is in place to secure it, and insert the cable parallel to the board. I would prop the display open with another person's hands or, I personally use a small box on either side. This is so you can use two hands, because trust me, it is easier to use two hands to work on the cable than one to balance the display open and one to push it into place. Clip the retaining bracket, and screw the display in and test. As long as you don't break a socket off the logic board, you will likely be in the clear afterwards.
Hope this helps!