Don't worry about the labels Primary Master and Secondary Master. They only refer to what ports the devices are connected to, but they do NOT determine how you boot up.
In what follows, I will assume you want to boot from the 1 TB HDD, and use the 500 GB HDD as a data only drive. If that is backwards, just change my advice appropriately. I also will advise you to set up your system to try to boot from the optical (DVD) drive first, then the HDD. If you do that, under most circumstances you will NOT put a disk in the optical drive and when you boot up, the machine will discover quickly that the optical drive has nothing and will proceed to use the HDD. BUT in special situations if you place a bootable CD in the optical drive, it will boot from that and not even try the HDD. This is useful when you have trouble with the HDD.
Connect your items this way:
Set the jumpers on the back edge of the DVD drive to be a Master device. Consult the jumper diagram on the DVD unit for this setting. Connect it to the IDE port of the mobo (if you have two, connect to the Primary IDE port). For the wide 80-conductor ribbon cable, the BLUE connector on one end goes to the mobo port, the BLACK connector on the other end goes to your DVD drive, and there is nothing on the middle Grey connector.
For each of the two SATA units, there are NO jumpers to set. Even if your units have pins and jumpers on their back edge, do NOT change them. There is no such thing as Master and Slave for SATA drives! Connect the HDD you want as your boot device (I'm assuming the 1 TB here) to the mobo SATA port with the lowest number - usually SATA_1. The other you can connect to the next port BUT don't do that yet!
You don't say whether you are trying to Install Windows 8 on a new machine, or whether this machine is already running Windows. But IF you are Installing Win 8 on a new machine, it is best to do that in a machine with only ONE hard drive in it. This alters a feature of Windows that sometimes causes trouble later when a second drive is removed. You do the entire Install process until it's all working. Then you shut down and install the second HDD. When you boot again, Windows should detect the second unit and make it available. (But see later if this is a brand new completely empty hard drive.)
OK. With the DVD and 1 TB units installed in the machine, place the Windows Install CD in the optical drive. Turn on the machine and go immediately into BIOS Setup.Usually you do this by holding down the "Del" key while the machine starts up, until the BIOS Setup opening screen appears. Now look for where you set the Boot Priority Sequence. Set this so the first boot device is the optical drive, and the second is the 1 TB HDD. SAVE and EXIT from here and the machine will boot from the Install disk. Do your complete Install. When finished, remove the Install CD from the optical drive and reboot - it should boot cleanly from the HDD.
Now you shut down, install the second HDD (500 GB) and reboot. If that 500 GB unit is new and completely empty, it will NOT show up in My Computer. First you have to Initialize it or Create a New Simple Volume on it, using Windows' built-in utility, Disk Management. For details of this, check WyomingKnott's post on the topic here:
http://www.tomshardware.com/forum/265764-32-guide-installed-disk-system
and pay special attention to his Step 5. (It is easily found under the sticky called "Storage FAQs and Resources!" at the top of this forum.)