Use the flat end of a spudger to pry the fan cable connector up off its socket on the logic board.
It is useful to twist the spudger axially from beneath the fan cable wires to release the connector.
The fan socket and the fan connector can be seen in the second and third pictures. Be careful not to break the plastic fan socket off the logic board as you use your spudger to lift the fan connector straight up and out of its socket. The layout of the logic board shown in the second picture may look slightly different than your machine but the fan socket is the same.
Apple sticks a small strip of clear plastic with adhesive applied to one side to the logic board behind the camera cable connector to keep it in its socket. When moving it out of the way, be sure not to break any surface-mount components off the logic board.
Hold the end of the cable retainer down with one finger while you use the tip of a spudger to slightly lift the other end and rotate it away from the camera cable connector.
Carefully lift the logic board assembly from the left side and work it out of the upper case, minding the port side that may get caught during removal.
Do not entirely remove the logic board yet!
Ensure that the logic board is free from all connections to the upper case (except the battery connector) before proceeding.