This requires care to make sure the black clip does not break off. If it does, replacing that connector will be a microsoldering job likely to exceed the value of the board.
It is also worth noting, that you can simply leave this connector as you found it and not remove the ribbon cable, and still complete this repair. Unless you intend to remove the lower LCD from the mainboard or if it is interfering with the microphone cable (white) routing, it will not be an issue.
Leaving this connected will also help keep the lower LCD from flopping around when you remove the mainboard.
I'll bet that capacitor shifted while separating the top board.
This requires care to make sure the black clip does not break off. If it does, replacing that connector will be a microsoldering job likely to exceed the value of the board.
It is also worth noting, that you can simply leave this connector as you found it and not remove the ribbon cable, and still complete this repair. Unless you intend to remove the lower LCD from the mainboard or if it is interfering with the microphone cable (white) routing, it will not be an issue.
Leaving this connected will also help keep the lower LCD from flopping around when you remove the mainboard.