And in this picture of the 3GS, the colors are inverted... the top is white and the lock is black.
And here's another picture of just the circuit board, top of the phone is on the left.
You should be able to see the connector for #3, but it's not labeled.
Do not try prying anything from the top or sides.
Ribbon #3 slides in from the TOP (the black end), but the lock is on the BOTTOM (the white end).
On the BOTTOM, you can open the lock easily by lifting the bottom edge upward... it flips straight up.
With the lock open, insert the ribbon cable into the top, black end. You may need to push slightly (I used a tiny flathead) to get it in as far as possible.
Then, just rotate the lock back down into place. You might need to use a small tool, but it's very easy.
Here is a picture of the connector.