Yes, it is possible.
First, save everything you might need from the HDD and SSD.
To make it simpler, install Windows first. If asked, select custom install/setup, and you can select where to install windows. You need to delete every partition, so you can only see the unformatted and unpartitioned drives.
You will now half the storage on each drive, by creating a partition (a 125GB partition on the SSD, and a 500gb partition on the HDD), and format them. Leave the free space for ubuntu unpartitioned, and carry on installing Windows.
After it is installed, install Ubuntu. Select custom installation as well, and you can format the space for Linux here.
After Linux is installed, you may want to start GParted and label each partition with a name, as there will be 5 partitions seen by Ubuntu, and shown in the file explorer. Identify them according to
On the SSD:
The partition for windows (125GB, NTFS filesystem)
The boot partition for windows (100MB, NTFS)
And the partition for Ubuntu (~125GB, has ext4 filesystem)
(Note that there may be a separate partition as the children of the 500GB Ubuntu partition, with "Swap" as the filesystem, but you can ignore this because it won't show up normally in the file browser
On the HDD:
The windows partition for games (500GB, NTFS filesystem)
And Ubuntu partition for games (500GB, ext4 filesystem)
After labeling them, mount them (if they weren't mounted by default) and open the file explorer, to see if they show up by the labels you gave them