Hi Yes you need to connect both; However ill detail it for you
The molex is for power only, the 3 pin is for speed control you will wanna connect that to your cpu fan connecter near you cpu or you might have issue starting your computer depending on bios settings.