Hi, Thanks for taking my message. HP-M8400F,720GB, Windows Vista. The plug it on the Mother board for both fans.
The CPU heatsink fan must be plugged into the CPU_FAN header on the motherboard. The speed controls can be set in the BIOS. Please verify this.
Other fans such as the rear fan, front fan, side fan, top fan, etc., may be plugged into the appropriately motherboard headers OR directly to the PSU. Another option is to "daisy chain" the fans together and then plug them into the PSU.
In your situation, change the fan header into which the rear fan is plugged into. Check performance.
Start by downloading some or all of these and then familiarize yourself with your computer. You have a media center computer which is setup differently inside. Getting to the parts inside can be somewhat of a challenge (I replaced the motherboard on my friend's HP media center computer one time).