He'll need a resistor in series with the LED in the opto-coupler.You need to connect the opto coupler collector to the blue wire and the emitter to ground.
and you need to connect the optocoupler anode to Arduino +5V and cathode to the Arduino GPIO.
Now, whe the GPIO is high, the opto is off and the blue wire is pulled up, so high. When the GPIO is low, opto is on so blue wire is pulled down.
This assumes the opto can sink the required current, which we still don't know.
Bob
I suspect that if the fan input is left either open-circuit or short-circuit the fan defaults to full speed, but we don't know which way 'up' the actual PWM signal is. Generally on automotive circuits 'pulled down' = active so it needs the LED to be ON for the high-side pulse from the Arduino, ie wired from GPIO to ground (via resistor of course). Otherwise higher PWM values -> lower fan speed!



