Hi,
Look at PulseIn to measure the fan. Think about using an optocoupler to pick off that signal..
Servo library to control a servo for the valve...
Your smarts to decide the control function. You probably want some delay / smoothing, or to be really , um, cool, google "Arduino PID" .