Old thread I know, but the plug with three wires is your oxygen sensor on the downpipe. Typically, modern cars have two. The first one upstream near the turbo in the downpipe and the second one is back by the catalytic converter. Their primary function is air and fuel mixture measurement.